@bastienrobert/events
v1.0.4
Published
Event emitter for all engines
Downloads
88
Readme
Install
npm install @bastienrobert/events
Usage
import EventEmitter from '@bastienrobert/events'
const eventEmitter = new EventEmitter()
eventEmitter.on('foo', bar => {
console.log(bar)
})
eventEmitter.emit('foo', 'here we go!')
API
See the Documentation. You can check the Node.js EventEmitter docs too, most methods are implemented in this package.