{"id":22980878,"url":"https://github.com/screamz/observable-state-proxy","last_synced_at":"2025-04-02T09:41:46.657Z","repository":{"id":263338780,"uuid":"890068755","full_name":"ScreamZ/observable-state-proxy","owner":"ScreamZ","description":"An embedded JavaScript State observable library with minimal footprint.","archived":false,"fork":false,"pushed_at":"2024-11-18T11:41:56.000Z","size":38,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-08T00:42:32.709Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ScreamZ.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2024-11-17T23:18:07.000Z","updated_at":"2024-11-23T12:16:45.000Z","dependencies_parsed_at":"2024-11-18T01:32:37.661Z","dependency_job_id":null,"html_url":"https://github.com/ScreamZ/observable-state-proxy","commit_stats":null,"previous_names":["screamz/observable-state-proxy"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ScreamZ%2Fobservable-state-proxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ScreamZ%2Fobservable-state-proxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ScreamZ%2Fobservable-state-proxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ScreamZ%2Fobservable-state-proxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ScreamZ","download_url":"https://codeload.github.com/ScreamZ/observable-state-proxy/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246792902,"owners_count":20834920,"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-12-15T01:46:03.634Z","updated_at":"2025-04-02T09:41:46.638Z","avatar_url":"https://github.com/ScreamZ.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Embedded : Observable state proxy\n\n\u003e [!IMPORTANT]\n\u003e This module is ESM only.\n\nThis module provides a proxy that can be used to observe changes to an object's properties. It's optimized for use with embedded systems, where memory is limited and performance is critical.\n\n## Installation\n\n```sh\nnpm install @embedded-js/observable-state-proxy\n```\n\n## Example usage\n\n```ts\nimport {\n  createObservableProxy,\n  subscribeKey,\n} from \"@embedded-js/observable-state-proxy\";\n\nconst stateObs = createObservableProxy({\n  count: 0,\n  name: \"example\",\n});\n\nconst unsubscribe = subscribeKey(stateObs, \"count\", (newValue) =\u003e {\n  console.log(`count changed to ${newValue}`);\n});\n\nstateObs.count = 1; // Console: count changed from 0 to 1\nstateObs.name = \"test\"; // No console output\n\nunsubscribe();\n\nstateObs.count = 2; // No console output\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscreamz%2Fobservable-state-proxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscreamz%2Fobservable-state-proxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscreamz%2Fobservable-state-proxy/lists"}