{"id":22705283,"url":"https://github.com/hecom-rn/listener","last_synced_at":"2025-03-29T20:25:15.332Z","repository":{"id":42904296,"uuid":"251221710","full_name":"hecom-rn/listener","owner":"hecom-rn","description":"通用消息机制处理库","archived":false,"fork":false,"pushed_at":"2022-03-26T10:18:56.000Z","size":31,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-04-26T21:47:52.555Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/hecom-rn.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":"2020-03-30T06:34:13.000Z","updated_at":"2020-03-30T09:24:57.000Z","dependencies_parsed_at":"2022-08-22T17:31:07.721Z","dependency_job_id":null,"html_url":"https://github.com/hecom-rn/listener","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hecom-rn%2Flistener","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hecom-rn%2Flistener/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hecom-rn%2Flistener/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hecom-rn%2Flistener/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hecom-rn","download_url":"https://codeload.github.com/hecom-rn/listener/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246239278,"owners_count":20745683,"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-10T09:09:54.098Z","updated_at":"2025-03-29T20:25:15.273Z","avatar_url":"https://github.com/hecom-rn.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# listener\n\n[![npm version](https://img.shields.io/npm/v/@hecom/listener.svg?style=flat)](https://www.npmjs.com/package/@hecom/listener)\n[![Build Status](https://travis-ci.org/hecom-rn/listener.svg?branch=master)](https://travis-ci.org/hecom-rn/listener)\n\n通用消息机制处理库，扩展了各个平台实现的消息机制，将常用的字符串类型`eventName`扩展为字符串数组，并且支持SubEvent。\n\n**接口**\n\n`init`: 设置平台相关的消息实现;\n\n`register`: 注册消息;\n\n`registerWithSubEvent`: 注册子事件消息，例如：当trigger一个Type为`['a','b','c']`的消息时，注册Type为`['a','b']`或者`['a']`的事件可以收到回调。\n\n`unregister`: 取消注册消息，或者可通过Subscription.remove方法直接取消注册。\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhecom-rn%2Flistener","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhecom-rn%2Flistener","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhecom-rn%2Flistener/lists"}