{"id":19041961,"url":"https://github.com/writetome51/array-insert-at","last_synced_at":"2025-07-26T20:06:42.957Z","repository":{"id":122062359,"uuid":"156459686","full_name":"writetome51/array-insert-at","owner":"writetome51","description":"Function that inserts new items at a specified index in the array","archived":false,"fork":false,"pushed_at":"2021-11-14T00:08:07.000Z","size":23,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-15T02:06:51.055Z","etag":null,"topics":["array-manipulations","insert","items","javascript","new","typescript"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-11-06T22:57:28.000Z","updated_at":"2021-11-14T00:08:10.000Z","dependencies_parsed_at":null,"dependency_job_id":"8327dacb-34a7-40ec-a15c-0321668c19dd","html_url":"https://github.com/writetome51/array-insert-at","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/writetome51%2Farray-insert-at","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/writetome51%2Farray-insert-at/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/writetome51%2Farray-insert-at/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/writetome51%2Farray-insert-at/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/writetome51","download_url":"https://codeload.github.com/writetome51/array-insert-at/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240100512,"owners_count":19747683,"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","insert","items","javascript","new","typescript"],"created_at":"2024-11-08T22:33:31.825Z","updated_at":"2025-02-21T22:44:27.678Z","avatar_url":"https://github.com/writetome51.png","language":"JavaScript","readme":"# insertAt\\\u003cT\\\u003e(\u003cbr\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;index,\u003cbr\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;values: T[],\u003cbr\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;array: T[]\u003cbr\u003e): void\n\nAt `index`, `values` are inserted in `array`.   \n`index` can be negative or positive.  If positive, existing items beginning at that index   \nwill be pushed to the right to make room.  If negative, existing items ending at that  \nindex will be pushed to the left to make room.  No items get removed.\n\n## Examples\n```js\nlet arr = [1,2,3,4];   \ninsertAt(2, [7, 8], arr);  \n// arr is now [1,2,7,8,3,4]\n\nlet arr = [1,2,3,4];   \ninsertAt(-1, [7, 8], arr);  \n// arr is now [1,2,3,4,7,8]\n\nlet arr = [1,2,3,4];   \ninsertAt(-4, [7, 8], arr);  \n// arr is now [1,7,8,2,3,4]\n```\n\n## Installation\n`npm i @writetome51/array-insert-at`\n\n\n## Loading\n```js\nimport { insertAt } from '@writetome51/array-insert-at';\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwritetome51%2Farray-insert-at","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwritetome51%2Farray-insert-at","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwritetome51%2Farray-insert-at/lists"}