PATH:
usr
/
local
/
n
/
versions
/
node
/
12.14.1
/
lib
/
node_modules
/
npm
/
node_modules
/
bluebird
/
js
/
release
"use strict"; module.exports = function(Promise) { var util = require("./util"); var async = Promise._async; var tryCatch = util.tryCatch; var errorObj = util.errorObj; function spreadAdapter(val, nodeback) { var promise = this; if (!util.isArray(val)) return successAdapter.call(promise, val, nodeback); var ret = tryCatch(nodeback).apply(promise._boundValue(), [null].concat(val)); if (ret === errorObj) { async.throwLater(ret.e); } } function successAdapter(val, nodeback) { var promise = this; var receiver = promise._boundValue(); var ret = val === undefined ? tryCatch(nodeback).call(receiver, null) : tryCatch(nodeback).call(receiver, null, val); if (ret === errorObj) { async.throwLater(ret.e); } } function errorAdapter(reason, nodeback) { var promise = this; if (!reason) { var newReason = new Error(reason + ""); newReason.cause = reason; reason = newReason; } var ret = tryCatch(nodeback).call(promise._boundValue(), reason); if (ret === errorObj) { async.throwLater(ret.e); } } Promise.prototype.asCallback = Promise.prototype.nodeify = function (nodeback, options) { if (typeof nodeback == "function") { var adapter = successAdapter; if (options !== undefined && Object(options).spread) { adapter = spreadAdapter; } this._then( adapter, errorAdapter, undefined, this, nodeback ); } return this; }; };
[-] bind.js
[edit]
[-] thenables.js
[edit]
[-] promise.js
[edit]
[-] context.js
[edit]
[-] direct_resolve.js
[edit]
[-] using.js
[edit]
[-] synchronous_inspection.js
[edit]
[-] cancel.js
[edit]
[-] errors.js
[edit]
[-] method.js
[edit]
[-] generators.js
[edit]
[-] reduce.js
[edit]
[-] nodeify.js
[edit]
[+]
..
[-] promise_array.js
[edit]
[-] queue.js
[edit]
[-] es5.js
[edit]
[-] some.js
[edit]
[-] call_get.js
[edit]
[-] catch_filter.js
[edit]
[-] schedule.js
[edit]
[-] util.js
[edit]
[-] async.js
[edit]
[-] race.js
[edit]
[-] settle.js
[edit]
[-] timers.js
[edit]
[-] any.js
[edit]
[-] map.js
[edit]
[-] join.js
[edit]
[-] filter.js
[edit]
[-] props.js
[edit]
[-] each.js
[edit]
[-] nodeback.js
[edit]
[-] debuggability.js
[edit]
[-] bluebird.js
[edit]
[-] assert.js
[edit]
[-] promisify.js
[edit]
[-] finally.js
[edit]