Server IP : 192.250.235.76 / Your IP : 45.90.210.12
System : Linux s2968.sgp1.stableserver.net 4.18.0-513.18.1.lve.2.el8.x86_64 #1 SMP Sat Mar 30 15:36:11 UTC 2024 x86_64
PHP Version : 8.2.29
Disable Function : NONE
cURL : ON | WGET : ON | Sudo : OFF | Pkexec : OFF
1902120114081995
Server IP : 198.54.116.172 / Your IP : 216.73.216.36
System : Linux server322.web-hosting.com 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13 UTC 2025 x86_64
PHP Version : 7.4.33
Disable Function : mail
cURL : ON | WGET : ON | Sudo : OFF | Pkexec : OFF
Upload Files :
Command :
Current File : /lib/node_modules/npm/node_modules/promise-retry//index.js
'use strict';
var errcode = require('err-code');
var retry = require('retry');
var hasOwn = Object.prototype.hasOwnProperty;
function isRetryError(err) {
return err && err.code === 'EPROMISERETRY' && hasOwn.call(err, 'retried');
}
function promiseRetry(fn, options) {
var temp;
var operation;
if (typeof fn === 'object' && typeof options === 'function') {
// Swap options and fn when using alternate signature (options, fn)
temp = options;
options = fn;
fn = temp;
}
operation = retry.operation(options);
return new Promise(function (resolve, reject) {
operation.attempt(function (number) {
Promise.resolve()
.then(function () {
return fn(function (err) {
if (isRetryError(err)) {
err = err.retried;
}
throw errcode('Retrying', 'EPROMISERETRY', { retried: err });
}, number);
})
.then(resolve, function (err) {
if (isRetryError(err)) {
err = err.retried;
if (operation.retry(err || new Error())) {
return;
}
}
reject(err);
});
});
});
}
module.exports = promiseRetry;
Name
Size
Last Modified
Owner / Group
Permissions
Options
.. -- March 03 2024 22:36:29 root / root 0755 node_modules -- March 03 2024 22:36:29 root / root 0755 .editorconfig 0.215 KB March 10 2021 14:36:38 root / root 0644 .npmignore 0.024 KB March 10 2021 14:36:38 root / root 0644 .travis.yml 0.053 KB March 10 2021 14:36:38 root / root 0644 LICENSE 1.031 KB March 10 2021 14:36:38 root / root 0644 README.md 3.188 KB March 10 2021 14:36:38 root / root 0644 index.js 1.335 KB March 10 2021 14:36:38 root / root 0644 package.json 1.798 KB March 10 2021 14:36:38 root / root 0644