Gathering detailed insights and metrics for retry-as-promised
Gathering detailed insights and metrics for retry-as-promised
Gathering detailed insights and metrics for retry-as-promised
Gathering detailed insights and metrics for retry-as-promised
npm install retry-as-promised
Typescript
Module System
Node Version
NPM Version
JavaScript (72.94%)
TypeScript (27.06%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
58 Stars
83 Commits
25 Forks
3 Watchers
2 Branches
18 Contributors
Updated on May 28, 2025
Latest Version
7.1.1
Package Id
retry-as-promised@7.1.1
Unpacked Size
39.21 kB
Size
9.74 kB
File Count
9
NPM Version
9.8.1
Node Version
18.18.2
Published on
Feb 27, 2025
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
Retry promises when they fail
1$ npm install --save retry-as-promised 2$ yarn add retry-as-promised
1var retry = require('retry-as-promised').default; 2 3var warningFn = function(msg){ someLoggingFunction(msg, 'notice'); }; 4 5// Will call the until max retries or the promise is resolved. 6return retry(function (options) { 7 // options.current, times callback has been called including this call 8 return promise; 9}, { 10 max: 3, // maximum amount of tries 11 timeout: 10000 // throw if no response or error within millisecond timeout, default: undefined, 12 match: [ // Must match error signature (ala bluebird catch) to continue 13 Sequelize.ConnectionError, 14 'SQLITE_BUSY' 15 ], 16 backoffBase: 1000 // Initial backoff duration in ms. Default: 100, 17 backoffExponent: 1.5 // Exponent to increase backoff each try. Default: 1.1 18 backoffJitter: 150 // Amount of randomized jitter in ms to add to retry interval to spread retries out over time. Default: 0.0. 19 report: warningFn, // the function used for reporting; must have a (string, object) argument signature, where string is the message that will passed in by retry-as-promised, and the object will be this configuration object + the $current property 20 name: 'SourceX' // if user supplies string, it will be used when composing error/reporting messages; else if retry gets a callback, uses callback name in erroring/reporting; else (default) uses literal string 'unknown' 21});
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 6/29 approved changesets -- score normalized to 2
Reason
8 existing vulnerabilities detected
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
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