{"id":17175155,"url":"https://github.com/sophiamersmann/svelte-writable-array-store","last_synced_at":"2026-05-06T07:36:50.468Z","repository":{"id":124603233,"uuid":"468086379","full_name":"sophiamersmann/svelte-writable-array-store","owner":"sophiamersmann","description":"Writable array store in Svelte","archived":false,"fork":false,"pushed_at":"2022-04-29T16:00:33.000Z","size":121,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-30T01:28:07.539Z","etag":null,"topics":["array","store","svelte","writable"],"latest_commit_sha":null,"homepage":"","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/sophiamersmann.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":"2022-03-09T20:43:55.000Z","updated_at":"2022-08-03T02:24:05.000Z","dependencies_parsed_at":null,"dependency_job_id":"3ff2e347-3000-46e5-b96d-7b0cfbb43cd6","html_url":"https://github.com/sophiamersmann/svelte-writable-array-store","commit_stats":{"total_commits":9,"total_committers":1,"mean_commits":9.0,"dds":0.0,"last_synced_commit":"8e1600bdc4fdf34b948704a981bcb49be27c22aa"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sophiamersmann%2Fsvelte-writable-array-store","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sophiamersmann%2Fsvelte-writable-array-store/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sophiamersmann%2Fsvelte-writable-array-store/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sophiamersmann%2Fsvelte-writable-array-store/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sophiamersmann","download_url":"https://codeload.github.com/sophiamersmann/svelte-writable-array-store/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245352092,"owners_count":20601093,"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","store","svelte","writable"],"created_at":"2024-10-14T23:55:52.984Z","updated_at":"2026-05-06T07:36:45.449Z","avatar_url":"https://github.com/sophiamersmann.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# svelte-writable-array-store\n\nWritable array store in Svelte.\n\nAdds [Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array) methods to a Svelte store, including: [`push`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/push), [`pop`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/pop), [`shift`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/shift), [`unshift`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/unshift), [`splice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/splice), [`sort`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort), [`reverse`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reverse) and [`copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/copyWithin).\n\n## Install\n\n```bash\nnpm install svelte-writable-array-store\n```\n\n## Usage\n\nCreate a store:\n\n```js\nimport { writableArray } from 'svelte-writable-array-store';\n\nexport const arrayStore = writableArray([1, 2, 3, 4, 5]);\n```\n\nUse it:\n\n```js\nimport { arrayStore } from './whereever';\n\n// exposes all built-in store functions\narrayStore.subscribe(...)\narrayStore.set(...)\narrayStore.update(...)\n$arrayStore\n\n// offers additional array methods\narrayStore.push(6, 7, 8) // add elements to the end\narrayStore.pop() // remove last element\narrayStore.shift() // remove first element\narrayStore.unshift(0) // add elements to the beginning\narrayStore.splice(2) // changes the contents of an array\narrayStore.sort() // sort elements\narrayStore.reverse() // reverse elements\narrayStore.copyWithin(1, 2) // shallow copies part of an array to another location in the same array\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsophiamersmann%2Fsvelte-writable-array-store","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsophiamersmann%2Fsvelte-writable-array-store","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsophiamersmann%2Fsvelte-writable-array-store/lists"}