# sx-event

> ````

Latest version **1.0.5** (published 2019-05-27) · ISC license · 0 weekly downloads

## Install

```sh
npm install sx-event
pnpm add sx-event
yarn add sx-event
bun add sx-event
```

## 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.5 |
| Published | 2019-05-27 |
| First published | 2019-04-16 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | sunxi1997 |

## Links

- npm: https://www.npmjs.com/package/sx-event
- Repository: https://github.com/sunxi1997/sx-event
- Homepage: https://github.com/sunxi1997/sx-event#readme
- Issues: https://github.com/sunxi1997/sx-event/issues
- npm.io page: https://npm.io/package/sx-event

## Recent versions

- 1.0.5 (latest) — 2019-05-27
- 1.0.4 — 2019-05-05
- 1.0.3 — 2019-04-17
- 1.0.2 — 2019-04-17
- 1.0.1 — 2019-04-17
- 1.0.0 — 2019-04-16

## README

# event 类

# 方法列表

### $on

````

 @param {String} eventName - 要监听的事件名称
 @param {Function} func   -  要绑定的回调函数
 
 @return {Object} errData
 
````
返回errCode说明

  errCode | 说明
 ---|---  
  0 | 正常 
  1 | 参数类型错误 

### $off

 ````
 @param {String} eventName - 要监听的事件名称
 @param {Function} func   -  要绑定的回调函数
 
 @return {Object} errData
 ````
 返回errCode说明
 
   errCode | 说明
  ---|---  
   0 | 正常 
   1 | 参数类型错误 
   2 | 事件不存在 
   3 | 事件回调列表中不包含该回调 


### $emit
````
@param {String} eventName - 要触发的事件名称
@param params   -  触发时传递给回调函数的参数

@return Object
````
 返回errCode说明
 
   errCode | 说明
  ---|---  
   0 | 正常 
   1 | 参数类型错误 
   2 | 事件不存在

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