MCPcopy Index your code
hub / github.com/cujojs/when / lift

Function lift

when.js:106–113  ·  view source on GitHub ↗

* Lift the supplied function, creating a version of f that returns * promises, and accepts promises as arguments. * @param {function} f * @returns {Function} version of f that returns promises

(f)

Source from the content-addressed store, hash-verified

104 * @returns {Function} version of f that returns promises
105 */
106 function lift(f) {
107 return function() {
108 for(var i=0, l=arguments.length, a=new Array(l); i<l; ++i) {
109 a[i] = arguments[i];
110 }
111 return apply(f, this, a);
112 };
113 }
114
115 /**
116 * Call f in a future turn, with the supplied args, and return a promise

Callers 1

when.jsFile · 0.70

Calls 1

applyFunction · 0.70

Tested by

no test coverage detected