Call a callback appropriately from a promise

npm install unpromise
2 downloads in the last week
5 downloads in the last month


Sometimes you want a promise to work with a callback.

install: npm install unpromise


var unpromise = require('unpromise');

function createTask(str, callback) {
  // task.create returns an object that
  // has .success and .error methods
  var somePromise = task.create();
  unpromise(somePromise, callback);
npm loves you