Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bestzip

Package Overview
Dependencies
Maintainers
3
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bestzip

Uses OS zip command if avaliable (for better performance and speed) or node.js version if there is no system command avaliable. Can be called via node or command line.

  • 2.1.6
  • Source
  • npm
  • Socket score

Version published
Maintainers
3
Created

What is bestzip?

The bestzip npm package is a simple utility for creating zip files. It allows you to zip files and directories with ease, making it useful for packaging and distributing files.

What are bestzip's main functionalities?

Zip a single file

This feature allows you to zip a single file into an archive. The code sample demonstrates how to zip 'file.txt' into 'archive.zip'.

const bestzip = require('bestzip');
bestzip({ source: 'file.txt', destination: 'archive.zip' })
  .then(() => {
    console.log('File zipped successfully!');
  })
  .catch(err => {
    console.error(err.stack);
  });

Zip multiple files

This feature allows you to zip multiple files into a single archive. The code sample demonstrates how to zip 'file1.txt' and 'file2.txt' into 'archive.zip'.

const bestzip = require('bestzip');
bestzip({ source: ['file1.txt', 'file2.txt'], destination: 'archive.zip' })
  .then(() => {
    console.log('Files zipped successfully!');
  })
  .catch(err => {
    console.error(err.stack);
  });

Zip a directory

This feature allows you to zip an entire directory. The code sample demonstrates how to zip the contents of 'myDirectory' into 'archive.zip'.

const bestzip = require('bestzip');
bestzip({ source: 'myDirectory', destination: 'archive.zip' })
  .then(() => {
    console.log('Directory zipped successfully!');
  })
  .catch(err => {
    console.error(err.stack);
  });

Other packages similar to bestzip

FAQs

Package last updated on 27 Jul 2020

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc