When you're working with functions that make use of the Node.js callback pattern, where callbacks are in the form of function(err, result), Q provides a few advantageous service functions for adapting between them. The two most important functions are: Q.nfcall()
and Q.nfapply()
:
They are both used for calling functions with the same resemblance of Node.js so that they can generate promises.