Skip to content

junosuarez/ninvoke

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 ninvoke

running the tests

From package root:

$ npm install
$ npm test

thanks

kudos to Q, whose api I stole.

contributors

license

MIT. (c) MMXIII jden jason@denizac.org. See LICENSE.md

About

Call a Node callback style method and return a Promise

Resources

License

Stars

Watchers

Forks

Packages

No packages published