y-emitter
v13.0.3
Published
Yielding emitter
Downloads
151
Readme
Emitter
Sample usage
var Emitter = require('y-emitter'),
emitter = new Emitter(),
target = emitter.target;
target.walk(function* listener(){
yield this.until('click');
console.log('click');
yield this.until('clock');
console.log('clock');
this.walk(listener);
});
emitter.give('click'); // click
emitter.give('clock'); // clock
emitter.give('clock');
emitter.give('click'); // click