Gathering detailed insights and metrics for aggregate-error
Gathering detailed insights and metrics for aggregate-error
Gathering detailed insights and metrics for aggregate-error
Gathering detailed insights and metrics for aggregate-error
npm install aggregate-error
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
245 Stars
35 Commits
19 Forks
7 Watching
1 Branches
8 Contributors
Updated on 09 Jun 2024
Minified
Minified + Gzipped
JavaScript (79.28%)
TypeScript (20.72%)
Cumulative downloads
Total Downloads
Last day
-7.9%
5,471,189
Compared to previous day
Last week
2.1%
32,035,180
Compared to previous week
Last month
12.4%
130,706,748
Compared to previous month
Last year
17.6%
1,322,595,770
Compared to previous year
2
Create an error from multiple errors
Note: With Node.js 15, there's now a built-in AggregateError
type.
1npm install aggregate-error
1import AggregateError from 'aggregate-error'; 2 3const error = new AggregateError([new Error('foo'), 'bar', {message: 'baz'}]); 4 5throw error; 6/* 7AggregateError: 8 Error: foo 9 at Object.<anonymous> (/Users/sindresorhus/dev/aggregate-error/example.js:3:33) 10 Error: bar 11 at Object.<anonymous> (/Users/sindresorhus/dev/aggregate-error/example.js:3:13) 12 Error: baz 13 at Object.<anonymous> (/Users/sindresorhus/dev/aggregate-error/example.js:3:13) 14 at AggregateError (/Users/sindresorhus/dev/aggregate-error/index.js:19:3) 15 at Object.<anonymous> (/Users/sindresorhus/dev/aggregate-error/example.js:3:13) 16 at Module._compile (module.js:556:32) 17 at Object.Module._extensions..js (module.js:565:10) 18 at Module.load (module.js:473:32) 19 at tryModuleLoad (module.js:432:12) 20 at Function.Module._load (module.js:424:3) 21 at Module.runMain (module.js:590:10) 22 at run (bootstrap_node.js:394:7) 23 at startup (bootstrap_node.js:149:9) 24*/ 25 26for (const individualError of error.errors) { 27 console.log(individualError); 28} 29//=> [Error: foo] 30//=> [Error: bar] 31//=> [Error: baz]
Returns an Error
.
Type: Array<Error|object|string>
If a string, a new Error
is created with the string as the error message.
If a non-Error object, a new Error
is created with all properties from the object copied over.
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
security policy file detected
Details
Reason
0 existing vulnerabilities detected
Reason
license 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
dependency not pinned by hash detected -- score normalized to 0
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
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2024-11-18
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