when-node-promisify

0.0.5 • Public • Published

#when-node-promisify

transform when#promise from node style function.

when

  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
  });

Readme

Keywords

Package Sidebar

Install

npm i when-node-promisify

Weekly Downloads

5

Version

0.0.5

License

MIT

Last publish

Collaborators

  • nazomikan