X7ROOT File Manager
Current Path:
/usr/lib/node_modules/npm/node_modules/bluebird/js/release
usr
/
lib
/
node_modules
/
npm
/
node_modules
/
bluebird
/
js
/
release
/
ðŸ“
..
📄
any.js
(421 B)
📄
assert.js
(1.61 KB)
📄
async.js
(4.05 KB)
📄
bind.js
(1.92 KB)
📄
bluebird.js
(291 B)
📄
call_get.js
(4.25 KB)
📄
cancel.js
(3.62 KB)
📄
catch_filter.js
(1.39 KB)
📄
context.js
(2.33 KB)
📄
debuggability.js
(29.63 KB)
📄
direct_resolve.js
(1.36 KB)
📄
each.js
(789 B)
📄
errors.js
(3.63 KB)
📄
es5.js
(1.93 KB)
📄
filter.js
(314 B)
📄
finally.js
(4.5 KB)
📄
generators.js
(7.58 KB)
📄
join.js
(8.03 KB)
📄
map.js
(5.25 KB)
📄
method.js
(1.73 KB)
📄
nodeback.js
(1.52 KB)
📄
nodeify.js
(1.61 KB)
📄
promise.js
(25.59 KB)
📄
promise_array.js
(5.08 KB)
📄
promisify.js
(11.9 KB)
📄
props.js
(3.04 KB)
📄
queue.js
(1.83 KB)
📄
race.js
(1.22 KB)
📄
reduce.js
(5.01 KB)
📄
schedule.js
(2.1 KB)
📄
settle.js
(1.23 KB)
📄
some.js
(3.87 KB)
📄
synchronous_inspection.js
(2.75 KB)
📄
thenables.js
(2.08 KB)
📄
timers.js
(2.34 KB)
📄
using.js
(7.35 KB)
📄
util.js
(10.28 KB)
Editing: thenables.js
"use strict"; module.exports = function(Promise, INTERNAL) { var util = require("./util"); var errorObj = util.errorObj; var isObject = util.isObject; function tryConvertToPromise(obj, context) { if (isObject(obj)) { if (obj instanceof Promise) return obj; var then = getThen(obj); if (then === errorObj) { if (context) context._pushContext(); var ret = Promise.reject(then.e); if (context) context._popContext(); return ret; } else if (typeof then === "function") { if (isAnyBluebirdPromise(obj)) { var ret = new Promise(INTERNAL); obj._then( ret._fulfill, ret._reject, undefined, ret, null ); return ret; } return doThenable(obj, then, context); } } return obj; } function doGetThen(obj) { return obj.then; } function getThen(obj) { try { return doGetThen(obj); } catch (e) { errorObj.e = e; return errorObj; } } var hasProp = {}.hasOwnProperty; function isAnyBluebirdPromise(obj) { try { return hasProp.call(obj, "_promise0"); } catch (e) { return false; } } function doThenable(x, then, context) { var promise = new Promise(INTERNAL); var ret = promise; if (context) context._pushContext(); promise._captureStackTrace(); if (context) context._popContext(); var synchronous = true; var result = util.tryCatch(then).call(x, resolve, reject); synchronous = false; if (promise && result === errorObj) { promise._rejectCallback(result.e, true, true); promise = null; } function resolve(value) { if (!promise) return; promise._resolveCallback(value); promise = null; } function reject(reason) { if (!promise) return; promise._rejectCallback(reason, synchronous, true); promise = null; } return ret; } return tryConvertToPromise; };
Upload File
Create Folder