event-action
v1.0.1
Published
一个简单的发布订阅器
Downloads
6
Readme
event-action
一个简单的发布订阅器
install
npm install event-action --save
usage
import Events from 'event-action'
const events = new Events();
// 订阅
events.on('event', function (args) {
//
});
// 发布
events.emit('event', 'args');
// 关闭
events.off('event', function (args) {
//
});