Skip to content

dkh-dev/event-emitter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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!' ] }