Website : rimsha.abasa.com
backdoor
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
var
/
canvas
/
node_modules
/
time-limit-promise
/
Filename :
index.js
back
Copy
module.exports = function (promise, timeout, opts) { var Promise = promise.constructor; var rejectWith = opts && opts.rejectWith; var resolveWith = opts && opts.resolveWith; var timer; var timeoutPromise = new Promise(function (resolve, reject) { timer = setTimeout(function () { if (rejectWith !== void 0) reject(rejectWith); else resolve(resolveWith); }, timeout); }); return Promise.race([timeoutPromise, promise]) .then(function (value) { // For browser support: timer.unref is only available in Node. if (timer.unref) timer.unref(); return value; }, function (error) { // For browser support: timer.unref is only available in Node. if (timer.unref) timer.unref(); throw error; }); };