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
68.1
Supply Chain
75.4
Quality
74.9
Maintenance
100
Vulnerability
100
License
TypeScript (100%)
Total Downloads
1,127,832
Last Day
73
Last Week
921
Last Month
4,104
Last Year
77,104
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
12.3%
73
Compared to previous day
Last Week
-12.5%
921
Compared to previous week
Last Month
8.2%
4,104
Compared to previous month
Last Year
-48.7%
77,104
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
project is not fuzzed
Details
Reason
security policy file not detected
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
48 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-06-30
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