promise-event

0.0.0 • Public • Published

promise-event

var promiseEvent = require('promise-event');
var EventEmitter = require('events').EventEmitter;
var emitter = new EventEmitter();

emitter = promiseEvent(emitter);

emitter.on('hello', function *(world) {
  //...
});

emitter.emit('hello', 'world').then(function () {
  //...
});

co(function *() {
  yield emitter.emit('hello', 'world');
});

Install

$ npm install promise-event

License

The MIT License (MIT)

http://poying.mit-license.org/

/promise-event/

    Package Sidebar

    Install

    npm i promise-event

    Weekly Downloads

    0

    Version

    0.0.0

    License

    MIT

    Last publish

    Collaborators

    • poying