Completely original EventEmmitter that isn't based on anything else
Warning: at this development stage it only supports node
You should install it first
npm i eventemitter11
Then you can use it
const Emitter = require('eventemitter11');
const emitter = new Emitter();
// Init listener
emitter.listen('my-original-event', (args) => {
// do stuff
}, '10 minutes'); // TTL argument is optional
// Emit the event
emitter.emit('my-original-event', 'hi');
- Add browser support
- Implement
once
listener - Copy the rest of EventEmitter2