{"id":19042058,"url":"https://github.com/writetome51/array-replace-at","last_synced_at":"2026-05-18T03:05:37.230Z","repository":{"id":122062362,"uuid":"156836117","full_name":"writetome51/array-replace-at","owner":"writetome51","description":"Replaces 1 item in array at specified index","archived":false,"fork":false,"pushed_at":"2019-03-03T07:03:25.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-05T19:22:31.610Z","etag":null,"topics":["array-manipulations","item","javascript","replace","typescript"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/writetome51.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2018-11-09T08:58:25.000Z","updated_at":"2019-03-03T07:03:26.000Z","dependencies_parsed_at":"2024-01-13T16:25:30.908Z","dependency_job_id":"5aec1ae2-2a73-409c-9f8f-40d09a48aa38","html_url":"https://github.com/writetome51/array-replace-at","commit_stats":{"total_commits":5,"total_committers":1,"mean_commits":5.0,"dds":0.0,"last_synced_commit":"4fdfd2e91a7179943b9705d9ed0e4ed57f746d64"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/writetome51/array-replace-at","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/writetome51%2Farray-replace-at","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/writetome51%2Farray-replace-at/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/writetome51%2Farray-replace-at/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/writetome51%2Farray-replace-at/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/writetome51","download_url":"https://codeload.github.com/writetome51/array-replace-at/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/writetome51%2Farray-replace-at/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265569431,"owners_count":23789729,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["array-manipulations","item","javascript","replace","typescript"],"created_at":"2024-11-08T22:34:18.413Z","updated_at":"2025-09-21T18:05:13.701Z","avatar_url":"https://github.com/writetome51.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# replaceAt(index, newValue, array): void\n\nReplaces item at `index` with `newValue` in `array`.   \n`index` can be negative or positive.\n\n## Examples\n```\nlet arr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\n    \nreplaceAt(1, 20, arr);\n// arr is now [ 1, 20, 3, 4, 5, 6, 7, 8, 9, 10 ]\n    \nreplaceAt(-1, 20, arr);  \n// arr is now [ 1, 20, 3, 4, 5, 6, 7, 8, 9, 20 ]\n    \nreplaceAt(0, 'hello', arr);  \n// arr is now [ 'hello', 20, 3, 4, 5, 6, 7, 8, 9, 20 ]\n\nreplaceAt(-2, [21, 22], arr);  \n// arr is now [ 'hello', 20, 3, 4, 5, 6, 7, 8, [21, 22], 20 ]\n```\n\n## Installation\n`npm i  @writetome51/array-replace-at`\n\n## Loading\n```\nimport {replaceAt} from '@writetome51/array-replace-at';\nvar replaceAt = require('@writetome51/array-replace-at').replaceAt;\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwritetome51%2Farray-replace-at","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwritetome51%2Farray-replace-at","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwritetome51%2Farray-replace-at/lists"}