Socket
Socket
Sign inDemoInstall

node-zipkit

Package Overview
Dependencies
12
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    node-zipkit

Corss platform compress or extract `zip` archive


Version published
Weekly downloads
2
Maintainers
1
Install size
2.72 MB
Created
Weekly downloads
 

Readme

Source

node-zipkit

Corss platform compress or extract zip archive, inspired by feross/cross-zip

Install

Node.js 4 or higher

$ npm install node-zipkit --save

Usage

// zip folder
const path = require('path');
const zipkit = require('node-zipkit');

zipkit.zip(path.join(__dirname, 'test.zip'), path.join(__dirname, 'test.js')).then(function(directoryPath) {
  console.log('compress', directoryPath, 'success.');
});

// unzip archive
zipkit.unzip(path.join(__dirname, 'test.zip'), path.join(__dirname, 'test')).then(function(directoryPath) {
  console.log('extract', directoryPath, 'success.');
});

API

  • zipkit.zip(archivePath, filePath)

    Add files to archive

  • zipkit.zipSync(archivePath, filePath)

    Synchronous version of zip

  • zipkit.unzip(archivePath, filePath)

    Extract files from archive

  • zipkit.unzipSync(archivePath, filePath)

    Synchronous version of unzip

Keywords

FAQs

Last updated on 19 Jul 2016

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc