@dkh-dev/event-emitter
v3.0.1
Published
Something similar to Node.js EventEmitter
Downloads
18
Maintainers
Readme
EventEmitter
Something similar to Node.js EventEmitter.
Installation
npm install @dkh-dev/event-emitter
Example
import EventEmitter from '@dkh-dev/event-emitter';
const emitter = new EventEmitter();
emitter.on('test', console.log);
emitter.emit('test', { error: false, result: [ 'Yay!' ] });
// => { error: false, result: [ 'Yay!' ] }