Skip to content

Instantly share code, notes, and snippets.

@joshperry
Forked from danared/gist:d81d389bbbcc748568fe
Last active August 29, 2015 14:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joshperry/174fcc39006d324ff17e to your computer and use it in GitHub Desktop.
Save joshperry/174fcc39006d324ff17e to your computer and use it in GitHub Desktop.
var Promise = require('bluebird');
var someAsyncFunction = Promise.promisify(someFunction);
function one() {
return someAsyncFunction(params)
.then(function one(results) {
console.log('one');
});
}
one().then(function two() {
console.log('two');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment