Comparing version 0.1.2 to 0.2.0
{ | ||
"name": "qq", | ||
"description": "A heavy-weight library for promises, based on Q", | ||
"version": "0.1.2", | ||
"version": "0.2.0", | ||
"homepage": "http://github.com/kriskowal/qq/", | ||
@@ -31,3 +31,3 @@ "author": "Kris Kowal <kris@cixar.com> (http://github.com/kriskowal/)", | ||
"dependencies": { | ||
"q": ">=0.4.0" | ||
"q": ">=0.5.0" | ||
}, | ||
@@ -34,0 +34,0 @@ "devDependencies": { |
26
qq.js
@@ -312,11 +312,19 @@ (function (require, exports) { | ||
var proxy = Object.create(result.promise); | ||
while (prototype !== Object.prototype) { | ||
Object.getOwnPropertyNames(prototype).forEach(function (name) { | ||
if (typeof prototype[name] === "function") { | ||
proxy[name] = function () { | ||
return Q.post(result.promise, name, arguments); | ||
}; | ||
} | ||
}); | ||
prototype = Object.getPrototypeOf(prototype); | ||
var forward = function (name) { | ||
proxy[name] = function () { | ||
var args = Array.prototype.slice.call(arguments); | ||
return Q.post(result.promise, name, args); | ||
}; | ||
}; | ||
if (Array.isArray(constructor)) { | ||
constructor.forEach(forward); | ||
} else { | ||
while (prototype !== Object.prototype) { | ||
Object.getOwnPropertyNames(prototype).forEach(function (name) { | ||
if (typeof prototype[name] === "function") { | ||
forward(name); | ||
} | ||
}); | ||
prototype = Object.getPrototypeOf(prototype); | ||
} | ||
} | ||
@@ -323,0 +331,0 @@ return proxy; |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
24354
370
116
Updatedq@>=0.5.0