when-node-promisify

node-promisify based when.js

npm install when-node-promisify
6 downloads in the last week
13 downloads in the last month

when-nodo-promisify


  var promisify = require('when-node-promisify')
    , somePromiseFunc = promisify(someAsyncFunc)
    ;

  function someAsyncFunc(data, next) {
    // ...
    next(null, data);
  }


   somePromiseFunc(1).then(function (data) {
      // success
   }, function (err) {
      // err
   });
npm loves you