Event Emitter with lazy promise ! (see http://github.com/bios21/superlazypromise)
Then install it via npm:
$ npm install --save eventemitter-promise
Or via bower:
$ bower install --save eventemitter-promise
Each listener are stored to be fired later on a SuperLazyPromise
emit\on | event | event.* | event.context | event.context! |
---|---|---|---|---|
event | ✓ | ✓ | ✓ | ✓ |
event.context | ✓ | ✓ | ✓ | |
event.context! | ✓ | ✓ |
! : Firing an event on strict context (event.context!
) is not yet implemented.
const EventEmitter = require('eventemitter-promise');
class Clazz extends EventEmitter {
emit() {
}
on() {
}
}
ISC License. See the LICENSE
file.