Gathering detailed insights and metrics for extract-stack
Gathering detailed insights and metrics for extract-stack
Gathering detailed insights and metrics for extract-stack
Gathering detailed insights and metrics for extract-stack
npm install extract-stack
99.4
Supply Chain
86.1
Quality
75.2
Maintenance
100
Vulnerability
100
License
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
67 Stars
10 Commits
3 Forks
5 Watching
1 Branches
3 Contributors
Updated on 14 Mar 2024
JavaScript (86.24%)
TypeScript (13.76%)
Cumulative downloads
Total Downloads
Last day
-15.5%
135,339
Compared to previous day
Last week
-2.6%
808,394
Compared to previous week
Last month
11.4%
3,356,424
Compared to previous month
Last year
-28%
42,258,528
Compared to previous year
Extract the actual stack of an error
$ npm install extract-stack
1import extractStack from 'extract-stack'; 2 3const error = new Error('Missing unicorn'); 4 5console.log(error.stack); 6/* 7Error: Missing unicorn 8 at Object.<anonymous> (/Users/sindresorhus/dev/extract-stack/unicorn.js:2:15) 9 at Module._compile (module.js:409:26) 10 at Module.load (module.js:343:32) 11 at startup (node.js:139:18) 12*/ 13 14console.log(extractStack(error)); 15/* 16 at Object.<anonymous> (/Users/sindresorhus/dev/extract-stack/unicorn.js:2:15) 17 at Module._compile (module.js:409:26) 18 at Module.load (module.js:343:32) 19 at startup (node.js:139:18) 20*/ 21 22console.log(extractStack.lines(error)); 23/* 24[ 25 'Object.<anonymous> (/Users/sindresorhus/dev/extract-stack/unicorn.js:2:15)' 26 'Module._compile (module.js:409:26)' 27 'Module.load (module.js:343:32)' 28 'startup (node.js:139:18)' 29] 30*/
It gracefully handles cases where the stack is undefined
or empty and returns an empty string.
Returns the actual stack part of the error stack.
Returns the stack lines of the error stack without the noise as a string[]
.
Type: Error | string | undefined
Either an Error
or the .stack
of an Error
.
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
security policy file detected
Details
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
Found 2/10 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