arestov / re-emitter

Re emit events from another emitter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

re-emitter travis npm downloads

Re emit events from another emitter

reemit

browser support

install

npm install re-emitter

usage

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')

contributors

  • Raynos
  • Feross

license

MIT. Copyright (c) Raynos.

About

Re emit events from another emitter

License:MIT License


Languages

Language:JavaScript 100.0%