A small lib to work with events ergonomically, rather than defining a function for each on$thing
Enables you to call:
const emitter = createErgoEmitter()
// equivalent to emitter.on('something', cb)
emitter.onSomething(() => console.log('ran!')
emitter.emit('something')
Without any additional legwork. Unless you use TypeScript.
This library makes use of JavaScript proxies that intercept the call and map it to an event.