Attempt to turn a pass/fail event combo into a Node-style callback.
const eventcb =const req = http
$ npm install --save event-callback
eventcb(emitter, pass, [fail], callback)
fail events on
emitter to trigger
EventEmitter): The event emitter you want to handle on.
String): The event that passes the callback. i.e.
String): The event that fails the callback. Defaults to
Function): A node-style callback that gets triggered per your events.
eventcb.persist(emitter, pass, [fail], callback)
The same as above, except the callback gets triggered each time the events happen.
MIT © Jamen Marz