Gathering detailed insights and metrics for async-retry
Gathering detailed insights and metrics for async-retry
Gathering detailed insights and metrics for async-retry
Gathering detailed insights and metrics for async-retry
npm install async-retry
Typescript
Module System
Node Version
NPM Version
JavaScript (93.3%)
Dockerfile (6.7%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
1,881 Stars
116 Commits
55 Forks
60 Watchers
7 Branches
88 Contributors
Updated on Jul 08, 2025
Latest Version
1.3.3
Package Id
async-retry@1.3.3
Size
2.53 kB
NPM Version
6.14.11
Node Version
14.16.0
Published on
Aug 17, 2021
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
Retrying made simple, easy, and async.
1// Packages 2const retry = require('async-retry'); 3const fetch = require('node-fetch'); 4 5await retry( 6 async (bail) => { 7 // if anything throws, we retry 8 const res = await fetch('https://google.com'); 9 10 if (403 === res.status) { 11 // don't retry upon 403 12 bail(new Error('Unauthorized')); 13 return; 14 } 15 16 const data = await res.text(); 17 return data.substr(0, 500); 18 }, 19 { 20 retries: 5, 21 } 22);
1retry(retrier : Function, opts : Object) => Promise
async
or not. In other words, it can be a function that returns a Promise
or a value.Function
you can invoke to abort the retrying (bail)Number
identifying the attempt. The absolute first attempt (before any retries) is 1
.opts
are passed to node-retry
. Read its docs
retries
: The maximum amount of times to retry the operation. Default is 10
.factor
: The exponential factor to use. Default is 2
.minTimeout
: The number of milliseconds before starting the first retry. Default is 1000
.maxTimeout
: The maximum number of milliseconds between two retries. Default is Infinity
.randomize
: Randomizes the timeouts by multiplying with a factor between 1
to 2
. Default is true
.onRetry
: an optional Function
that is invoked after a new retry is performed. It's passed the Error
that triggered it as a parameter.No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
Reason
security policy file detected
Details
Reason
Found 8/30 approved changesets -- score normalized to 2
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
15 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More