thunkify-wrap
thunkify-wrap copied to clipboard
Improve `thunkify.event()`
Hey guys I really appreciate the method thunkify.event()
However, I think it would be great to have something like this:
var eventify = require('thunkify-wrap').eventify
eventify(emitter)
co(function*(){
yield emitter.once('ready') // returns a thunk if handler not provided
yield function(done){
emitter.once('finish', done) // works normally
}
})