aboutsummaryrefslogtreecommitdiffstats
path: root/node_modules/exponential-backoff/dist/options.js
diff options
context:
space:
mode:
authorpack <pack@packgekko.xyz>2026-08-09 10:37:07 +0000
committerpack <pack@packgekko.xyz>2026-08-09 10:37:07 +0000
commit55a4f1fc869e41aca748c63d3018f0448b1606e0 (patch)
treed132d1d01772b6d53faee3e63c534dea5706b78a /node_modules/exponential-backoff/dist/options.js
downloadcrud-55a4f1fc869e41aca748c63d3018f0448b1606e0.tar.gz
first commit
Diffstat (limited to '')
-rw-r--r--node_modules/exponential-backoff/dist/options.js31
1 files changed, 31 insertions, 0 deletions
diff --git a/node_modules/exponential-backoff/dist/options.js b/node_modules/exponential-backoff/dist/options.js
new file mode 100644
index 0000000..1d2ca17
--- /dev/null
+++ b/node_modules/exponential-backoff/dist/options.js
@@ -0,0 +1,31 @@
+"use strict";
+var __assign = (this && this.__assign) || function () {
+ __assign = Object.assign || function(t) {
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
+ s = arguments[i];
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
+ t[p] = s[p];
+ }
+ return t;
+ };
+ return __assign.apply(this, arguments);
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+var defaultOptions = {
+ delayFirstAttempt: false,
+ jitter: "none",
+ maxDelay: Infinity,
+ numOfAttempts: 10,
+ retry: function () { return true; },
+ startingDelay: 100,
+ timeMultiple: 2
+};
+function getSanitizedOptions(options) {
+ var sanitized = __assign(__assign({}, defaultOptions), options);
+ if (sanitized.numOfAttempts < 1) {
+ sanitized.numOfAttempts = 1;
+ }
+ return sanitized;
+}
+exports.getSanitizedOptions = getSanitizedOptions;
+//# sourceMappingURL=options.js.map \ No newline at end of file