UNPKG

mbus

Version:

If Node's EventEmitter and Eve were to have a child, it might look something like this

10 lines (8 loc) 253 B
var bus = require('..')(); var foo = require('..')('foo', bus); var stopFeed = bus.feed(function(evt) { console.log('received event name: ' + evt.name + ', with args: ', evt.args); }); // trigger some events foo('bar', 'hello', 'there'); foo('baz');