Installations
npm install decompress
Developer Guide
Typescript
No
Module System
N/A
Min. Node Version
>=4
Node Version
10.19.0
NPM Version
6.13.4
Score
91.7
Supply Chain
98.9
Quality
75.2
Maintenance
100
Vulnerability
99.6
License
Contributors
Unable to fetch Contributors
Languages
JavaScript (100%)
Developer
kevva
Download Statistics
Total Downloads
918,858,481
Last Day
157,042
Last Week
1,958,874
Last Month
11,783,307
Last Year
146,450,182
GitHub Statistics
415 Stars
166 Commits
52 Forks
13 Watching
1 Branches
12 Contributors
Package Meta Information
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
Total Downloads
Cumulative downloads
Total Downloads
918,858,481
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
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
decompress
Extracting archives made easy
See decompress-cli for the command-line version.
Install
$ npm install decompress
Usage
1const decompress = require('decompress'); 2 3decompress('unicorn.zip', 'dist').then(files => { 4 console.log('done!'); 5});
API
decompress(input, [output], [options])
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}
input
Type: string
Buffer
File to decompress.
output
Type: string
Output directory.
options
filter
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.
map
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});
plugins
Type: Array
Default: [decompressTar(), decompressTarbz2(), decompressTargz(), decompressUnzip()]
Array of plugins to use.
strip
Type: number
Default: 0
Remove leading directory components from extracted files.
License
MIT © Kevin Mårtensson
Stable Version
Stable Version
4.2.1
CRITICAL
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
- Info: project has a license file: license:0
- Info: FSF or OSI recognized license: MIT License: license:0
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
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 4 are checked with a SAST tool
Score
3.2
/10
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