{"id":26703987,"url":"https://github.com/sveiljs/sveil","last_synced_at":"2026-04-25T16:33:43.136Z","repository":{"id":189369656,"uuid":"680479265","full_name":"sveiljs/sveil","owner":"sveiljs","description":"Sveil core (svelte additional features)","archived":false,"fork":false,"pushed_at":"2023-12-02T20:05:45.000Z","size":47,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-25T13:44:37.270Z","etag":null,"topics":["library","state-management","stores","svelte","typescript","utils"],"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/sveiljs.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":"2023-08-19T11:28:34.000Z","updated_at":"2024-09-10T11:50:21.000Z","dependencies_parsed_at":null,"dependency_job_id":"3b75a9b4-c3a2-4775-9d87-3cd5387488cc","html_url":"https://github.com/sveiljs/sveil","commit_stats":null,"previous_names":["sveiljs/sveil"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/sveiljs/sveil","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sveiljs%2Fsveil","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sveiljs%2Fsveil/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sveiljs%2Fsveil/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sveiljs%2Fsveil/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sveiljs","download_url":"https://codeload.github.com/sveiljs/sveil/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sveiljs%2Fsveil/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32269459,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-25T09:15:33.318Z","status":"ssl_error","status_checked_at":"2026-04-25T09:15:31.997Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["library","state-management","stores","svelte","typescript","utils"],"created_at":"2025-03-27T04:22:36.114Z","updated_at":"2026-04-25T16:33:43.110Z","avatar_url":"https://github.com/sveiljs.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sveil (alpha version)\nSveil core.\n\n- Allow to subscribe for svelte stores (with unsubscribeAll option)\n- Allow to get current value of store with $ sign (emulate svelte store auto subscription behaiour)\n\n## Instalation\n  ```\n\tnpm i @sveil/core\n  ```\n\n## Basic example\n```\n/* eslint-disable @typescript-eslint/no-empty-interface */\nimport { type SubscribitionsBase, Subscribitions } from '@sveil/core';\nimport type { SvelteComponentState, SvelteStore, SvelteStoreFn } from '@sveil/core';\n\nexport interface State extends SvelteComponentState {\n\tcounter: SvelteStore\u003cnumber\u003e;\n\tcounterIncrement: SvelteStoreFn\u003cunknown\u003e;\n\tcounterSet: SvelteStoreFn\u003cnumber\u003e;\n}\n\n// Add properties in type\nexport interface ComponentService extends SubscribitionsBase\u003cState\u003e {}\n\n// Add properties in runtime\nexport class ComponentService extends Subscribitions {\n\tconstructor(state: State) {\n\t\tsuper(state);\n\t\t// after call super - value of counter should be accessable in class with this.$counter\n\t\t// in component you just need to call this.unsubscribeAll() in onDestroy\n\t\tthis.addSubscription(this.addSubscriptionLog()); //subscription option 1\n\t\tthis.subscribeStore(this.counter, this.subscribeStoreLog); //subscription option 2\n\t}\n\n\tlogCounter() {\n\t\tconsole.log('this.$counter', this.$counter); //current value of counter store\n\t}\n\n\taddSubscriptionLog() {\n\t\treturn this.counter.subscribe((n) =\u003e {\n\t\t\tconsole.log('addSubscription callback', n);\n\t\t});\n\t}\n\n\tsubscribeStoreLog(n: number) {\n\t\tconsole.log('subscribeStore callback', n);\n\t}\n}\n```\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsveiljs%2Fsveil","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsveiljs%2Fsveil","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsveiljs%2Fsveil/lists"}