{"id":16980223,"url":"https://github.com/whiteinge/rx-bytag","last_synced_at":"2025-03-21T23:14:28.508Z","repository":{"id":137560154,"uuid":"67435415","full_name":"whiteinge/rx-bytag","owner":"whiteinge","description":"An RxJS operator to provide very lightweight \"channels\"","archived":false,"fork":false,"pushed_at":"2016-09-23T22:33:24.000Z","size":8,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-01T01:41:17.469Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/whiteinge.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":"2016-09-05T16:22:10.000Z","updated_at":"2017-04-28T20:14:50.000Z","dependencies_parsed_at":"2023-04-20T10:15:45.575Z","dependency_job_id":null,"html_url":"https://github.com/whiteinge/rx-bytag","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/whiteinge%2Frx-bytag","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/whiteinge%2Frx-bytag/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/whiteinge%2Frx-bytag/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/whiteinge%2Frx-bytag/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/whiteinge","download_url":"https://codeload.github.com/whiteinge/rx-bytag/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244880658,"owners_count":20525515,"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-10-14T01:50:27.258Z","updated_at":"2025-03-21T23:14:28.487Z","avatar_url":"https://github.com/whiteinge.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rx-byTag\n\nAn RxJS operator to provide very lightweight \"channels\".\n\nThis wraps the Rx\n[filter](https://github.com/Reactive-Extensions/RxJS/blob/master/doc/api/core/operators/where.md)\noperator to perform succinct matching using light shell-style glabbing syntax.\nThe whole package consists of three, small functions.\n\nThis provides two things:\n\n* A lightweight way to create a \"by convention channel\" in an Rx stream by sending an object payload with a `tag` attribute.\n* A very lightweight hierarchical namespacing syntax using simple strings. Each \"level\" in the slash-delimited string provides an additional level of specificity.\n\n## Example\n\n```js\nimport {byTag, sendAction} from 'rx-bytag';\nRx.Observable.prototype.byTag = byTag;\n\nvar Dispatcher = new Rx.Subject();\nvar send = sendAction.bind(Dispatcher);\n\nvar sub = Dispatcher.byTag('foo/*/baz')\n    .subscribe(x =\u003e console.log(x);\n\nsend('foo/bar/baz', {bar: 'Bar'});\n// =\u003e {tag: 'foo/bar/baz', data: {bar: 'Bar'}}\n\n// With currying for easy use in callbacks.\nsend('foo/bar/baz')({bar: 'Bar'});\n// =\u003e {tag: 'foo/bar/baz', data: {bar: 'Bar'}}\n```\n\n## Related Projects\n\n* The [Rxmq.js](https://github.com/rxmqjs/rxmq.js) project provides much more robust channel functionality and uses a far more granular filtering syntax.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwhiteinge%2Frx-bytag","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwhiteinge%2Frx-bytag","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwhiteinge%2Frx-bytag/lists"}