1.0.4 • Published 3 years ago

yyx-event v1.0.4

Weekly downloads
2
License
MIT
Repository
github
Last release
3 years ago

yyx-event

在使用Flux库的时候遇到其中融合的events库出现问题,导致监听的事件删除不掉,监听事件存在重复调用的情况下,自行基于events开发事件库 替换flux框架中的相关事件库


In the use of Flux library encountered in the fusion of the events library problems, leading to the incident can not be deleted eavesdropping, there are two occasions to monitor the event call, based on the event development event library Replaces the related event library in the flux framework

travis dep npm downloads

##install: npm install yyx-event

Tips


Usage yyx-event

var EventEmitter = require('yyx-event');
var event = new EventEmitter();


//监听事件回调
//Monitor event callbacks
let listenFun = function(){};


//监听
//listenging 
event.addListener('listen',listenFun);

//触发监听事件
//trigger listening event
event.emit('listen');


//卸载事件监听
//remove listening event
event.removeListener('listen',listenFun);

//设置最大监听事件数量
//set the maximum number of listening events
event.setMaxListeners(maxNumbers);

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago

0.1.3

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago