Simple, small and with off-hook.
import EventEmitter from "jenesius-event-emitter";
const offMessage = EventEmitter.on('message', m => {});
EventEmitter.emit('message', 'simple');
// If handler not needed:
offMessage();
class Test extends EventEmitter {
// ...
}
const test = new Test()
test.on('message', () => {})
test.emit('message');
or
const a = new EventEmitter();
a.on('message', () => {})
a.emit('message');