{"id":21585491,"url":"https://github.com/meepobrother/meepo-event","last_synced_at":"2026-05-08T16:50:41.454Z","repository":{"id":57294106,"uuid":"116077718","full_name":"meepobrother/meepo-event","owner":"meepobrother","description":"事件订阅及通知","archived":false,"fork":false,"pushed_at":"2018-01-15T02:28:00.000Z","size":1825,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-22T16:38:03.564Z","etag":null,"topics":["angular","events"],"latest_commit_sha":null,"homepage":"https://meepo.com.cn","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/meepobrother.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":"2018-01-03T01:50:01.000Z","updated_at":"2018-01-05T16:13:06.000Z","dependencies_parsed_at":"2022-09-01T08:41:56.320Z","dependency_job_id":null,"html_url":"https://github.com/meepobrother/meepo-event","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/meepobrother/meepo-event","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meepobrother%2Fmeepo-event","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meepobrother%2Fmeepo-event/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meepobrother%2Fmeepo-event/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meepobrother%2Fmeepo-event/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/meepobrother","download_url":"https://codeload.github.com/meepobrother/meepo-event/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meepobrother%2Fmeepo-event/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261641280,"owners_count":23188443,"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":["angular","events"],"created_at":"2024-11-24T15:10:52.148Z","updated_at":"2026-05-08T16:50:36.416Z","avatar_url":"https://github.com/meepobrother.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# event like socket for angular\n\n- 引入\n```ts\nimport { SocketRoom, SocketModule, SocketService } from 'meepo-event';\n```\n- 注册根room\n```ts\nSocketModule.forRoot(new SocketRoom('root'))\n```\n- 注册子room\n```ts\nSocketModule.forChild(new SocketRoom('index'))\n```\n\n```ts\n\nconstructor(\n  public event: SocketService\n){\n  // 监听事件\n  this.event.on('index',(data)=\u003e{\n    console.log('index',data);\n  });\n  this.event.on('root',(data)=\u003e{\n    console.log('root',data);\n  });\n}\n\nemit(){\n  // 触发事件\n  this.event.emit('index','index test');\n  this.event.emit('root','root test');\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeepobrother%2Fmeepo-event","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmeepobrother%2Fmeepo-event","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeepobrother%2Fmeepo-event/lists"}