when-promisify

a simple method to make node-style callback function return a promise instead. Based on when.js

npm install when-promisify
1 downloads in the last week
7 downloads in the last month

when-promisify

Make any node-style callback function return a promise instead.
when-promisify supports two ways to promisify a callback function.

  1. simple way: just pass a function

    var promisify = require('when-promisify')
    var promise = promisify( cbFunction )
    
  2. pass a function with its context

    var promisify = require('when-promisify')
    var promise = promisify( Object, 'methodName' )
    
npm loves you