@dkx/retry-promise
v1.0.0
Published
Retry promise
Readme
DKX/RetryPromise
Retry promise
Installation
$ npm install --save @dkx/retry-promiseor with yarn
$ yarn add @dkx/retry-promiseUsage
import {retryPromise} from '@dkx/retry-promise';
(async () => {
await retryPromise(async () => {
await doSomething();
}, {
retries: 10,
delay: 100,
exponential: false,
shouldRetry: (times) => {
return findOutIfOperationShouldRetry(times); // return boolean
},
});
})();All options are optional.
