Big update!Introducing GitHub Bot Commands. Learn more
Socket
Log inBook a demo

extract-zip

Package Overview
Dependencies
4
Maintainers
2
Versions
24
Issues
File Explorer

Advanced tools

extract-zip

unzip a zip file into a directory using 100% javascript

    2.0.1latest

Version published
Maintainers
2
Weekly downloads
11,244,002
decreased by-0.85%

Weekly downloads

Changelog

Source

2.0.1

Fixed

  • stop using deprecated process.umask (#96)
  • correct minimum Node version (>= 10.17.0) based on fs.promises stability (#105)

Readme

Source

extract-zip

Unzip written in pure JavaScript. Extracts a zip into a directory. Available as a library or a command line program.

Uses the yauzl ZIP parser.

NPM Uses JS Standard Style Build Status

Installation

Make sure you have Node 10 or greater installed.

Get the library:

npm install extract-zip --save

Install the command line program:

npm install extract-zip -g

JS API

const extract = require('extract-zip') async function main () { try { await extract(source, { dir: target }) console.log('Extraction complete') } catch (err) { // handle any errors } }

Options

  • dir (required) - the path to the directory where the extracted files are written
  • defaultDirMode - integer - Directory Mode (permissions), defaults to 0o755
  • defaultFileMode - integer - File Mode (permissions), defaults to 0o644
  • onEntry - function - if present, will be called with (entry, zipfile), entry is every entry from the zip file forwarded from the entry event from yauzl. zipfile is the yauzl instance

Default modes are only used if no permissions are set in the zip file.

CLI Usage

extract-zip foo.zip <targetDirectory>

If not specified, targetDirectory will default to process.cwd().

Keywords

FAQs

What is extract-zip?

unzip a zip file into a directory using 100% javascript

Is extract-zip popular?

The npm package extract-zip receives a total of 10,483,838 weekly downloads. As such, extract-zip popularity was classified as popular.

Is extract-zip well maintained?

We found that extract-zip demonstrated a not healthy version release cadence and project activity because the last version was released a year ago.It has 2 open source maintainers collaborating on the project.

Last updated on 10 Jun 2020

Did you know?

Socket installs a Github app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.

Install Socket
Socket

Product

Subscribe to our newsletter

Get open source security insights delivered straight into your inbox. Be the first to learn about new features and product updates.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc