# ocean-message

> ocean, message

Latest version **1.0.0** (published 2019-07-18) · Apache License 2.0 license · 0 weekly downloads

## Install

```sh
npm install ocean-message
pnpm add ocean-message
yarn add ocean-message
bun add ocean-message
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2019-07-18 |
| First published | 2019-07-18 |
| Weekly downloads | 0 |
| License | Apache License 2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 20 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5 |
| Author | shu.ma |
| Maintainers | gaoyuan_gary |
| Keywords | ocean, message |

## Links

- npm: https://www.npmjs.com/package/ocean-message
- Repository: https://github.com/BETA-FE-TEAM/ocean-message
- Homepage: https://github.com/BETA-FE-TEAM/ocean-message#readme
- Issues: https://github.com/BETA-FE-TEAM/ocean-message/issues
- npm.io page: https://npm.io/package/ocean-message

## Recent versions

- 1.0.0 (latest) — 2019-07-18

## README

## ocean-message-plugins
### contributors：
### 黄攀 马恕


###  ***Intro: main-funcitons***
####  MsgRegister,  MsgUnregister,  MsgTrigger .
####  

```

import OceanMsg from '@ocean/message';

  /**
   * MsgRegister
   * 注册事件
   * @export
   * @param {string} eventName （参考格式：EVENT:NAME）
   * @param {func} callback
   */

OceanMsg.MsgRegister('EVENT:NAME', callback);

  /**
   * MsgTrigger
   * 触发事件
   * @export
   * @param {string} eventName
   * @param {any} data
   * @returns null
   */
OceanMsg.MsgTrigger('EVENT:NAME', data);

  /**
   * MsgUnregister
   * 撤销事件绑定
   * @export
   * @param {string} eventName
   * @param {func} callback
   */
OceanMsg.MsgUnregister('EVENT:NAME', callback); 

```
####

---
_Source: https://npm.io/package/ocean-message · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
