Gathering detailed insights and metrics for wait-for-throwable
Gathering detailed insights and metrics for wait-for-throwable
Gathering detailed insights and metrics for wait-for-throwable
Gathering detailed insights and metrics for wait-for-throwable
npm install wait-for-throwable
Typescript
Module System
Min. Node Version
Node Version
NPM Version
68.2
Supply Chain
66.9
Quality
75.3
Maintenance
100
Vulnerability
100
License
JavaScript (100%)
Total Downloads
271,420
Last Day
116
Last Week
1,195
Last Month
6,690
Last Year
116,402
1 Stars
32 Commits
1 Forks
3 Watching
1 Branches
2 Contributors
Latest Version
1.0.1
Package Id
wait-for-throwable@1.0.1
Unpacked Size
4.49 kB
Size
2.28 kB
File Count
4
NPM Version
6.14.8
Node Version
14.9.0
Cumulative downloads
Total Downloads
Last day
-73.3%
116
Compared to previous day
Last week
-23.1%
1,195
Compared to previous week
Last month
-14.5%
6,690
Compared to previous month
Last year
53.2%
116,402
Compared to previous year
This method was inspired by built-in wait utilities in test frameworks, such as waitFor
in testing-library, waitUntil
in webdriverIO, or waitFor
in puppeteer. However, this module uses a standalone and generic implementation, allowing you to wait for and retry any function, both synchronous or Promise-based. You can use this in your tests directly with your favorite assertion helper.
1npm install wait-for-throwable
waitForThrowable()
→ Promise
Retries the provided method until it succeeds. The method is executed immediately, and if it fails, is retries at a defined internal until the total amount of wait time is reached. If the method succeeds at any time during the retries, the promise will resolve with the resulting value of the method. If the method continues to fail when the total timeout is reached, no more retries will occur and the promise will be rejected with the latest failure.
The arguments are:
method {Function}
: the method to retrym which can be a synchronous method or a promise-returning (or async
) method[options] {Object}
: options that define the behavior of the retries. Everything is optional.
[interval = 5] {Number}
: the amount of time to wait between retries[total = 2000] {Number}
: the total amount of time to retry. If this is used along with count
, retries will stop at whichever value is reached first.[count = Infinity] {Number}
: the maximum number of times to retry. If this is used along with total
, retries will stop at whichever value is reached first.No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
Found 1/26 approved changesets -- score normalized to 0
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
dependency not pinned by hash detected -- score normalized to 0
Details
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 2024-12-23
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