Skip to content

Instantly share code, notes, and snippets.

@skarfacegc
Created April 19, 2016 19:10
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 skarfacegc/a95069cd22b633cdbff1af2345d72250 to your computer and use it in GitHub Desktop.
Save skarfacegc/a95069cd22b633cdbff1af2345d72250 to your computer and use it in GitHub Desktop.
promise example from erik
function promised(fn) {
return function(cb) {
return new Promise(function(resolve, reject) {
fn(function { cb(); resolve() });
});
}
}
promised(myAsync)(myCallback).then(...);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment