{"id":13735485,"url":"https://github.com/omer-g/persistent-svelte-store","last_synced_at":"2025-05-08T11:33:31.007Z","repository":{"id":38826344,"uuid":"463645215","full_name":"omer-g/persistent-svelte-store","owner":"omer-g","description":"A generic persistent store according to the Svelte store contract","archived":false,"fork":false,"pushed_at":"2022-04-09T19:11:18.000Z","size":5,"stargazers_count":88,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-11-15T03:33:38.734Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/omer-g.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}},"created_at":"2022-02-25T19:00:27.000Z","updated_at":"2024-06-21T20:03:17.000Z","dependencies_parsed_at":"2022-09-18T08:41:23.595Z","dependency_job_id":null,"html_url":"https://github.com/omer-g/persistent-svelte-store","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/omer-g%2Fpersistent-svelte-store","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omer-g%2Fpersistent-svelte-store/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omer-g%2Fpersistent-svelte-store/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omer-g%2Fpersistent-svelte-store/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/omer-g","download_url":"https://codeload.github.com/omer-g/persistent-svelte-store/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253059398,"owners_count":21847284,"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":[],"created_at":"2024-08-03T03:01:07.347Z","updated_at":"2025-05-08T11:33:30.264Z","avatar_url":"https://github.com/omer-g.png","language":"TypeScript","funding_links":[],"categories":["Browser Storage","TypeScript"],"sub_categories":[],"readme":"# persistent-svelte-store\n\n## Description\nA generic persistent writable store, built from scratch in TypeScript according to the Svelte store contract. Store value is stored in `localStorage` as a JSON string, but this is transparent to user. The store is reactive across tabs or windows using the Broadcast Channel API.\n\n## Example\nCreate a store and supply a type\n\u003e`stores.ts`\n\u003e```typescript\n\u003e import { persistentWritable } from \"./persistentStore\";\n\u003e export const store = persistentWritable\u003cobject\u003e(\"storeKey\", {});\nUse like any writable store\n\u003e`App.svelte`\n\u003e```typescript\n\u003e \u003cscript lang=\"ts\"\u003e\n\u003e   import { store } from \"./stores\";\n\u003e   $store = { id: 1 };\n\u003e   console.log($store.id);\n\u003e \u003c/script\u003e\n\n## Sources\nTo learn more about Svelte stores see the [Svelte Docs](https://svelte.dev/docs).\n\n## Usage\nAvailable for use freely under the [Unlicense License](https://unlicense.org/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fomer-g%2Fpersistent-svelte-store","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fomer-g%2Fpersistent-svelte-store","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fomer-g%2Fpersistent-svelte-store/lists"}