UNPKG

493 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3function buildRetryFunction(retryOptions) {
4 var _a = retryOptions || {}, retryIf = _a.retryIf, _b = _a.max, max = _b === void 0 ? 5 : _b;
5 return function retryFunction(count, operation, error) {
6 if (count >= max)
7 return false;
8 return retryIf ? retryIf(error, operation) : !!error;
9 };
10}
11exports.buildRetryFunction = buildRetryFunction;
12//# sourceMappingURL=retryFunction.js.map
\No newline at end of file