$ cnpm install promise-to-callback
Convert promise to callback interface
Because there are many promise implementations and callbacks are better to handle errors.
$ npm install --save promise-to-callback
var promiseToCallback = require('promise-to-callback');
promiseToCallback(promise)(function(err, data) {
...
});
MIT © Steve Mao
Copyright 2013 - present © cnpmjs.org | Home |