diff --git a/lib/q.js b/lib/q.js index 83b235e4..8e0545f1 100644 --- a/lib/q.js +++ b/lib/q.js @@ -149,10 +149,10 @@ function defer() { * of the returned object, apart from that it is usable whereever promises are * bought and sold. */ -exports.makePromise = makePromise; -exports.Promise = makePromise; // deprecated +exports.makePromise = Promise; +exports.Promise = Promise; // deprecated -function makePromise(descriptor, fallback, valueOf) { +function Promise(descriptor, fallback, valueOf) { if (fallback === undefined) { fallback = function (op) { @@ -229,7 +229,7 @@ function isRejected(object) { */ exports.reject = reject; function reject(reason) { - return makePromise({ + return Promise({ "when": function (rejected) { return rejected ? rejected(reason) : reject(reason); } @@ -260,7 +260,7 @@ function ref(object) { // not already Promises. if (isPromise(object)) return object; - return makePromise({ + return Promise({ "when": function (rejected) { return object; }, @@ -299,7 +299,7 @@ function ref(object) { */ exports.def = def; function def(object) { - return makePromise({ + return Promise({ "isDef": function () {} }, function fallback(op, resolved) { var args = Array.prototype.slice.call(arguments, 2);