Skip to content

Instantly share code, notes, and snippets.

@davideicardi
Created August 13, 2015 23:27
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 davideicardi/6030d36c66e5b9c5cdb9 to your computer and use it in GitHub Desktop.
Save davideicardi/6030d36c66e5b9c5cdb9 to your computer and use it in GitHub Desktop.
Create promise from node async function
function denodifyMethod(funcName){
return function(){
return Q.npost(this, funcName, arguments);
}
}
serviceBusService.createTopicIfNotExistsQ = denodifyMethod("createTopicIfNotExists");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment