1.0.0 • Published 7 years ago

@dkx/retry-promise v1.0.0

Weekly downloads
1
License
MIT
Repository
gitlab
Last release
7 years ago

DKX/RetryPromise

Retry promise

Installation

$ npm install --save @dkx/retry-promise

or with yarn

$ yarn add @dkx/retry-promise

Usage

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.

1.0.0

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago