with-retry
v1.0.1
Published
Retry an async action
Downloads
9
Readme
with-retry
Retry an async action
Usage
const fetchSite = superagent('https://www.github.com');
const fetchSiteWithRetry = withRetry(fetchSite);
const fetchSiteWithRetryWithOptions = withRetry(fetchSite, 5, {
shouldRetry: error => error.name === 'TimeoutError',
maxRetries: 5,
getDelayForRetry: n => 1000 * n,
});Author
Andreas Brekken [email protected]
