Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
@xhmikosr/decompress
Advanced tools
Extracting archives made easy
See decompress-cli for the command-line version.
npm install @xhmikosr/decompress
import decompress from '@xhmikosr/decompress';
decompress('unicorn.zip', 'dist').then(files => {
console.log('done!');
});
Returns a Promise for an array of files in the following format:
{
data: Buffer,
mode: Number,
mtime: String,
path: String,
type: String
}
Type: string
Buffer
File to decompress.
Type: string
Output directory.
Type: Function
Filter out files before extracting. E.g:
decompress('unicorn.zip', 'dist', {
filter: file => path.extname(file.path) !== '.exe'
}).then(files => {
console.log('done!');
});
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:
decompress('unicorn.zip', 'dist', {
map: file => {
file.path = `unicorn-${file.path}`;
return file;
}
}).then(files => {
console.log('done!');
});
Array
[decompressTar(), decompressTarbz2(), decompressTargz(), decompressUnzip()]
Array of plugins to use.
number
0
Remove leading directory components from extracted files.
MIT © Kevin Mårtensson
FAQs
Extracting archives made easy
The npm package @xhmikosr/decompress receives a total of 90,305 weekly downloads. As such, @xhmikosr/decompress popularity was classified as popular.
We found that @xhmikosr/decompress demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.