when-node-promisify
v0.0.5
Published
node-promisify based when.js
Downloads
3
Readme
#when-node-promisify
transform when#promise from node style function.
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
});