Gathering detailed insights and metrics for p-try-each
Gathering detailed insights and metrics for p-try-each
Gathering detailed insights and metrics for p-try-each
Gathering detailed insights and metrics for p-try-each
Runs promise-returning functions in series but stops whenever any of the functions were successful. If all functions reject, the promise will be rejected with the error of the final task
npm install p-try-each
Typescript
Module System
Node Version
NPM Version
66.7
Supply Chain
74.6
Quality
74.9
Maintenance
100
Vulnerability
100
License
TypeScript (100%)
Total Downloads
1,125,004
Last Day
117
Last Week
677
Last Month
3,875
Last Year
81,698
MIT License
11 Commits
1 Watchers
11 Branches
1 Contributors
Updated on Apr 09, 2020
Minified
Minified + Gzipped
Latest Version
1.0.1
Package Id
p-try-each@1.0.1
Size
2.31 kB
NPM Version
6.10.3
Node Version
12.10.0
Published on
Oct 14, 2019
Cumulative downloads
Total Downloads
Last Day
-20.4%
117
Compared to previous day
Last Week
-13.8%
677
Compared to previous week
Last Month
29.5%
3,875
Compared to previous month
Last Year
-45.8%
81,698
Compared to previous year
7
Runs promise-returning functions in series but stops whenever any of the functions were successful. If all functions reject, the promise will be rejected with the error of the final task
Similar to async/tryEach
.
npm install --save p-try-each
1const pTryEach = require('p-try-each'); 2 3const tasks = [ 4 () => Promise.resolve('foo'), 5 () => Promise.resolve('bar'), 6 () => Promise.resolve('baz') 7] 8 9(async () => { 10 const res = await pTryEach(tasks); 11 console.log(res); 12 // Logs: 13 // 'foo' 14})();
Returns a Promise
that is fulfilled with the value of the first fulfilled promise returned from calling the functions in tasks
. If none is fulfilled, the promise will be rejected with the error of the final task.
Type: Iterable<Function>
Functions must return a value. In case of a returned promise, it will be awaited before starting with the next task.
MIT
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 0/6 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
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
Reason
47 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-05-12
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