promises for events
npm install then-on
returns a promise.
emitter.on(event, resolve)
if the errorEvent is not explicitly null
, undefined
, false
or otherwise falsy, emitter.on(errorEvent, reject)
it makes use of .once
instead of .on
if present, and uses .removeListener
to remove the uncalled handler if it's available.