ninvoke
v1.0.0
Published
Call a Node callback style method and return a Promise
Readme
ninvoke
Call a Node callback style method and return a Promise
Implemented with bluebird for fast, Promise/A+ promises.
usage
var ninvoke = require('ninvoke')
var foo = {
bar: function (arg, cb) {
cb(null, !arg)
}
}
ninvoke(foo, 'bar', false)
.then(function (val) {
// val == true
})
installation
$ npm install ninvokerunning the tests
From package root:
$ npm install
$ npm testthanks
kudos to Q, whose api I stole.
contributors
- jden [email protected]
license
MIT. (c) MMXIII jden [email protected]. See LICENSE.md
