npm install re-emitter
var emitter = new EventEmitter()
var other = new EventEmitter()
reemit(emitter, other, ['foo', 'bar'])
other.on('foo', function () {
// foo will fire on other emitter!
})
emitter.emit('foo')
other.on('baz', function () {
// baz will not fire on other emitter
})
emitter.emit('baz')
- Raynos
- Feross
MIT. Copyright (c) Raynos.