@handy-common-utils/promise-utils
Advanced tools
Comparing version 1.2.6 to 1.2.7
@@ -67,3 +67,3 @@ /** | ||
* const result = await PromiseUtils.withRetry(() => doSomething(), [100, 200, 300, 500, 800, 1000]); | ||
* const result2 = await PromiseUtils.withRetry(() => doSomething(), Array.from({length: 10}, (_v, i) => Math.min(FIBONACCI_SEQUENCE[i], 10), err => err.statusCode === 429); | ||
* const result2 = await PromiseUtils.withRetry(() => doSomething(), Array.from({length: 10}, (_v, i) => 1000 * Math.min(FIBONACCI_SEQUENCE[i], 10), err => err.statusCode === 429); | ||
* const result3 = await PromiseUtils.withRetry(() => doSomething(), attempt => attempt <= 8 ? 1000 * Math.min(FIBONACCI_SEQUENCE[attempt - 1], 10) : undefined, err => err.statusCode === 429); | ||
@@ -70,0 +70,0 @@ * |
@@ -84,3 +84,3 @@ "use strict"; | ||
* const result = await PromiseUtils.withRetry(() => doSomething(), [100, 200, 300, 500, 800, 1000]); | ||
* const result2 = await PromiseUtils.withRetry(() => doSomething(), Array.from({length: 10}, (_v, i) => Math.min(FIBONACCI_SEQUENCE[i], 10), err => err.statusCode === 429); | ||
* const result2 = await PromiseUtils.withRetry(() => doSomething(), Array.from({length: 10}, (_v, i) => 1000 * Math.min(FIBONACCI_SEQUENCE[i], 10), err => err.statusCode === 429); | ||
* const result3 = await PromiseUtils.withRetry(() => doSomething(), attempt => attempt <= 8 ? 1000 * Math.min(FIBONACCI_SEQUENCE[attempt - 1], 10) : undefined, err => err.statusCode === 429); | ||
@@ -87,0 +87,0 @@ * |
{ | ||
"name": "@handy-common-utils/promise-utils", | ||
"version": "1.2.6", | ||
"version": "1.2.7", | ||
"description": "Promise related utilities", | ||
@@ -42,6 +42,3 @@ "scripts": { | ||
"author": "James Hu", | ||
"license": "Apache-2.0", | ||
"dependencies": { | ||
"-": "^0.0.1" | ||
} | ||
"license": "Apache-2.0" | ||
} |
@@ -58,3 +58,3 @@ # @handy-common-utils/promise-utils | ||
const result = await withRetry(() => doSomething(), [100, 200, 300, 500, 800, 1000]); | ||
const result2 = await withRetry(() => doSomething(), Array.from({length: 10}, (_v, i) => Math.min(FIBONACCI_SEQUENCE[i], 10)), err => err.statusCode === 429); | ||
const result2 = await withRetry(() => doSomething(), Array.from({length: 10}, (_v, i) => 1000 * Math.min(FIBONACCI_SEQUENCE[i], 10)), err => err.statusCode === 429); | ||
const result3 = await withRetry(() => doSomething(), attempt => attempt <= 8 ? 1000 * Math.min(EXPONENTIAL_SEQUENCE[attempt - 1], 10) : undefined, err => err.statusCode === 429); | ||
@@ -485,3 +485,3 @@ statusCode === 429); | ||
const result = await PromiseUtils.withRetry(() => doSomething(), [100, 200, 300, 500, 800, 1000]); | ||
const result2 = await PromiseUtils.withRetry(() => doSomething(), Array.from({length: 10}, (_v, i) => Math.min(FIBONACCI_SEQUENCE[i], 10), err => err.statusCode === 429); | ||
const result2 = await PromiseUtils.withRetry(() => doSomething(), Array.from({length: 10}, (_v, i) => 1000 * Math.min(FIBONACCI_SEQUENCE[i], 10), err => err.statusCode === 429); | ||
const result3 = await PromiseUtils.withRetry(() => doSomething(), attempt => attempt <= 8 ? 1000 * Math.min(FIBONACCI_SEQUENCE[attempt - 1], 10) : undefined, err => err.statusCode === 429); | ||
@@ -488,0 +488,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
0
68892