0.0.3 • Published 2 months ago

@saptool/bus v0.0.3

Weekly downloads
-
License
ISC
Repository
-
Last release
2 months ago

API


on

监听事件

onStick

监听粘性事件

emit

发送事件

crossbus.emit('eventType',{...},{stick: true})
crossbus.on('eventType',fn,{stick: true})

// on 需要显示指定需要接收粘性事件
// 同一个函数多次调用on 只会收到一次粘性事件

emitStick

发送粘性事件

once

注册事件,在执行后自动注销

off

注销事件

TODO

1. 可以与指定应用通信

2. 识别当前应用

3. 全局配置

4. channel

0.0.3

2 months ago

0.0.2

2 months ago

0.0.1

11 months ago

1.0.0

11 months ago