Gathering detailed insights and metrics for decompress
Gathering detailed insights and metrics for decompress
Gathering detailed insights and metrics for decompress
Gathering detailed insights and metrics for decompress
npm install decompress
Typescript
Module System
Min. Node Version
Node Version
NPM Version
91.7
Supply Chain
98.9
Quality
75.2
Maintenance
100
Vulnerability
99.6
License
JavaScript (100%)
Total Downloads
918,858,481
Last Day
157,042
Last Week
1,958,874
Last Month
11,783,307
Last Year
146,450,182
415 Stars
166 Commits
52 Forks
13 Watching
1 Branches
12 Contributors
Latest Version
4.2.1
Package Id
decompress@4.2.1
Size
3.20 kB
NPM Version
6.13.4
Node Version
10.19.0
Publised On
01 Apr 2020
Cumulative downloads
Total Downloads
Last day
-70.3%
157,042
Compared to previous day
Last week
-32.9%
1,958,874
Compared to previous week
Last month
-6.1%
11,783,307
Compared to previous month
Last year
-2.4%
146,450,182
Compared to previous year
Extracting archives made easy
See decompress-cli for the command-line version.
$ npm install decompress
1const decompress = require('decompress'); 2 3decompress('unicorn.zip', 'dist').then(files => { 4 console.log('done!'); 5});
Returns a Promise for an array of files in the following format:
1{ 2 data: Buffer, 3 mode: Number, 4 mtime: String, 5 path: String, 6 type: String 7}
Type: string
Buffer
File to decompress.
Type: string
Output directory.
Type: Function
Filter out files before extracting. E.g:
1decompress('unicorn.zip', 'dist', { 2 filter: file => path.extname(file.path) !== '.exe' 3}).then(files => { 4 console.log('done!'); 5});
Note that in the current implementation, filter
is only applied after fully reading all files from the archive in memory. Do not rely on this option to limit the amount of memory used by decompress
to the size of the files included by filter
. decompress
will read the entire compressed file into memory regardless.
Type: Function
Map files before extracting: E.g:
1decompress('unicorn.zip', 'dist', { 2 map: file => { 3 file.path = `unicorn-${file.path}`; 4 return file; 5 } 6}).then(files => { 7 console.log('done!'); 8});
Type: Array
Default: [decompressTar(), decompressTarbz2(), decompressTargz(), decompressUnzip()]
Array of plugins to use.
Type: number
Default: 0
Remove leading directory components from extracted files.
MIT © Kevin Mårtensson
Stable Version
1
9.8/10
Summary
Path Traversal in decompress
Affected Versions
< 4.2.1
Patched Versions
4.2.1
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
Found 3/30 approved changesets -- score normalized to 1
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
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