{"id":21730518,"url":"https://github.com/andy2046/observabvue","last_synced_at":"2025-03-20T23:24:02.670Z","repository":{"id":57313122,"uuid":"114620033","full_name":"andy2046/observabvue","owner":"andy2046","description":"vanilla JavaScript implementation of Observer pattern","archived":false,"fork":false,"pushed_at":"2018-03-14T05:15:04.000Z","size":132,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-28T19:12:45.450Z","etag":null,"topics":["javascript","observable","observer","observer-pattern","pattern"],"latest_commit_sha":null,"homepage":"","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/andy2046.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":"2017-12-18T09:14:29.000Z","updated_at":"2019-06-09T02:38:41.000Z","dependencies_parsed_at":"2022-09-20T23:20:49.462Z","dependency_job_id":null,"html_url":"https://github.com/andy2046/observabvue","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andy2046%2Fobservabvue","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andy2046%2Fobservabvue/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andy2046%2Fobservabvue/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andy2046%2Fobservabvue/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andy2046","download_url":"https://codeload.github.com/andy2046/observabvue/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244207715,"owners_count":20416104,"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":["javascript","observable","observer","observer-pattern","pattern"],"created_at":"2024-11-26T04:16:13.661Z","updated_at":"2025-03-20T23:24:02.647Z","avatar_url":"https://github.com/andy2046.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# observabvue\nvanilla JavaScript implementation of Observer pattern.\n\n## Examples\n```js\nimport { Observer, Subject } from 'observabvue';\n\nconst obs1 = Observer.of((data) =\u003e {\n  console.log('obs1', data)\n})\n\nconst obs2 = Observer.of((data) =\u003e {\n  console.log('obs2', data)\n})\n\nconst sub1 = Subject.of()\nconst sub2 = Subject.of()\n\nsub1.registerObserver(obs1)\nsub1.registerObserver(obs2)\n\nsub1.notifyObservers()\n// obs1 undefined\n// obs2 undefined\n\nconsole.log('sub1', sub1.data)\nconsole.log('sub2', sub2.data)\n// sub1 null\n// sub2 null\n\nsub1.unregisterObserver(obs1)\nsub1.data = {'1': 1}\n// obs2 { '1': 1 }\n\nconsole.log('sub1', sub1.data)\nconsole.log('sub2', sub2.data)\n// sub1 { '1': 1 }\n// sub2 null\n```\n\n## Installation\n\n```\nnpm install --save observabvue\n```\n\n## Usage\nYou can import from `observabvue`:\n\n```js\nimport { Observer, Subject } from 'observabvue';\n// or\nconst { Observer, Subject } = require('observabvue');\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandy2046%2Fobservabvue","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandy2046%2Fobservabvue","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandy2046%2Fobservabvue/lists"}