Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/junosuarez/ninvoke

Call a Node callback style method and return a Promise
https://github.com/junosuarez/ninvoke

Last synced: 8 days ago
JSON representation

Call a Node callback style method and return a Promise

Awesome Lists containing this project

README

        

# ninvoke
Call a Node callback style method and return a Promise

Implemented with [bluebird](https://npm.im/bluebird) for fast, Promise/A+ promises.

## usage
```js
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](https://npm.im/q), whose api I stole.

## contributors

- jden

## license

MIT. (c) MMXIII jden . See LICENSE.md