{"id":23414148,"url":"https://github.com/s-r-x/phx-wildcard","last_synced_at":"2025-04-09T05:16:39.789Z","repository":{"id":57323304,"uuid":"319662718","full_name":"s-r-x/phx-wildcard","owner":"s-r-x","description":"Wildcard support for phoenix channels","archived":false,"fork":false,"pushed_at":"2022-04-20T04:23:12.000Z","size":231,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-16T09:47:54.599Z","etag":null,"topics":["phoenix","phx","websocket","websockets","wildcard"],"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/s-r-x.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-12-08T14:25:44.000Z","updated_at":"2022-04-20T04:09:19.000Z","dependencies_parsed_at":"2022-09-21T00:52:10.802Z","dependency_job_id":null,"html_url":"https://github.com/s-r-x/phx-wildcard","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/s-r-x%2Fphx-wildcard","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s-r-x%2Fphx-wildcard/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s-r-x%2Fphx-wildcard/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s-r-x%2Fphx-wildcard/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/s-r-x","download_url":"https://codeload.github.com/s-r-x/phx-wildcard/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247980850,"owners_count":21027809,"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":["phoenix","phx","websocket","websockets","wildcard"],"created_at":"2024-12-22T19:57:16.900Z","updated_at":"2025-04-09T05:16:39.773Z","avatar_url":"https://github.com/s-r-x.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# phx-wildcard\n\nWildcard support for phoenix channels\n\n## Installation\n\n```sh\nnpm i phx-wildcard\n```\n\n## Usage\n\n```typescript\nimport { Socket } from 'phoenix';\nimport { Wildcard } from 'phx-wildcard';\n\nconst socket = new Socket('url');\nsocket.connect();\nconst ch = socket.channel('ch');\nch.join();\n\n// phx-wildcard mutates channel's onMessage property(but saves the old one), \n// so if you need to rewrite onMessage(for logging or whatever)\n// do your thing before creating a wildcard instance\nconst wc = new Wildcard(ch);\nconst cb1 = (e: string, payload: any) =\u003e {});\nconst cb2 = (e: string, payload: any) =\u003e {});\n// any pattern supported by Matcher(https://github.com/sindresorhus/matcher)\nwc.on('*', cb1);\nwc.on(['event-*', '*-123'], cb2);\nwc.off('*', cb1);\nwc.off(['event-*', '*-123'], cb2);\nwc.destroy();\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fs-r-x%2Fphx-wildcard","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fs-r-x%2Fphx-wildcard","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fs-r-x%2Fphx-wildcard/lists"}