UNPKG

374 BJavaScriptView Raw
1export function buildRetryFunction(retryOptions) {
2 var _a = retryOptions || {}, retryIf = _a.retryIf, _b = _a.max, max = _b === void 0 ? 5 : _b;
3 return function retryFunction(count, operation, error) {
4 if (count >= max)
5 return false;
6 return retryIf ? retryIf(error, operation) : !!error;
7 };
8}
9//# sourceMappingURL=retryFunction.js.map
\No newline at end of file