Call a Node callback style method and return a Promise
Implemented with bluebird for fast, Promise/A+ promises.
var ninvoke = require('ninvoke')
var foo = {
bar: function (arg, cb) {
cb(null, !arg)
}
}
ninvoke(foo, 'bar', false)
.then(function (val) {
// val == true
})
$ npm install ninvoke
From package root:
$ npm install
$ npm test
kudos to Q, whose api I stole.
- jden jason@denizac.org
MIT. (c) MMXIII jden jason@denizac.org. See LICENSE.md