Q.lazy()
Resolves promises idly.
npm install q-lazy
About
It's a simple plugin for Q allowing you to create lazy
promises. Such promises start to resolve only after calling .then()
on them.
Usage
var Q = ;; // extends Q { // ... return ret; // the return value can be a promise or a plain value} var promise = Q; // doesn't execute heavyFunc promise;
For specification take a look at provided testsuite. It's short.