Comparing version 1.0.2 to 1.0.3
{ | ||
"name": "ts-retry", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"main": "lib/index.js", | ||
@@ -5,0 +5,0 @@ "repository": "https://github.com/franckLdx/ts-retry.git", |
# ts-retry | ||
A little retry tool in javascript/typescript for node. | ||
## How to: | ||
* to retry something: <code>await retry(()=> {/* do something */}, {delay:100,maxTry:5})</code> | ||
* to retry something async : <code>await retryAsync(async ()=> {/* do something */}, {delay:100,maxTry:5})</code> | ||
Above examples make up to 5 attempts, waiting 100ms between each try. | ||
## API | ||
@@ -10,2 +16,2 @@ * retry(fn, retryOptions): call repeteadly fn until fn does not throw and exception. Stop after retryOptions.maxTry count. Between each call wait retryOptions.delay milliseconds. | ||
- maxTry maximum calls to fn. | ||
- delay: delay between each call (in milliseconds). | ||
- delay: delay between each call (in milliseconds). |
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
4551
17