when-promisify

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

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' )