@anchovy_studios/extract-all-zip

2.0.0 • Public • Published

extract-all-zip

Libraries.io dependency status for latest release npm npm bundle size GitHub issues NPM

Extract all zip within a directory recursively.

Requirement

Node.js 10.0.0 or higher

Installation

Installation is done using the npm install command:

$ npm install @anchovy_studios/extract-all-zip

Quick Start

const { extract } = require('extract-all-zip')

const path = 'path.to.your.folder'
try {
    const files = extract(path)
    console.log(files)
} catch (err) {
    console.error(err)
}

Documentation

Exception

The extract function will throw ExtractException object if there is an error during extraction or the path to the folder is invalid.

To get the exception message you can access its attribute:

try {
    ...
} catch (err) {
    console.error(err.message)
}

To get the native exception object or library dependency exception you can access its attribute:

try {
    ...
} catch (err) {
    console.error(err.errObj)
}

Return

The extract function will return a list of string which is the path of the zip file upon successfull extraction.

[
  'path.to.file-one.zip',
  'path.to.file-two.zip',
  'path.to.file-three.zip'
  ...
]

Dependency

Change History

CHANGELOG

License

MIT

Readme

Keywords

Package Sidebar

Install

npm i @anchovy_studios/extract-all-zip

Weekly Downloads

1

Version

2.0.0

License

MIT

Unpacked Size

5.95 kB

Total Files

5

Last publish

Collaborators

  • 1darknight98