delegate events from one emitter to another
Install with component(1):
$ component install yields/delegate-events
Delegate array of events
from emitter a
to emitter b
.
delegate(a, b, ['test']);
b.on('test', function(a, b){
assert('a' == a);
assert('b' == b);
});
a.emit('test', 'a', 'b');
$ make test
MIT