npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

ziptool

v1.0.2

Published

A simple tool to zip and unzip from the command line or from your code.

Readme

Ziptool

A simple tool to zip and unzip from the command line or from your code.

Requirements

  • Node.js https://nodejs.org

Installation

Ziptool can be installed globally: npm install ziptool -g

or locally into your npm project: npm install ziptool --save

Usage

  • CLI

    Globally installed

    Ziptool can be used directly from the command line to zip/unzip files:

    # Zip file-1.txt and file-2.png into a new zip archive 'zip-archive':
    ziptool --zip file-1.txt file-2.png -o zip-archive.zip
    
    # Extract the files from my-archive.zip into the directory 'my-directory':
    ziptool --unzip my-archive.zip -o zip-archive.zip

    For more information, run the command: ziptool --help

    Locally installed

    If ziptool is installed locally, you need to replace the 'ziptool' command by node node_modules/ziptool/bin/ziptool or by adding scripts into your package.json file:

      "scripts": [
        "ziptool": "ziptool"
      ]
  • Code

    Example

    Ziptool's api is also available to use in your Node.js javascript files, simply require it:

    const ziptool = require('ziptool');

    You can also require only the functions you need:

    const {zip} = require('ziptool');

    References

    • VERSION: constant

      /**
       * Current ziptool's version.
       * @const {string}
       */

      Example:

      console.log(ziptool.VERSION); // Will print the package's version you are using
    • zip (src, dest, callback): function

      /**
       * Create a zip archive from one or multiple files.
       * @param {string|Array<string>} src - The pathname(s) of the file(s) to compress.
       * @param {string} dest - The pathname of the zip archive to create.
       * @param {Function} callback - The function called after the zip archive has
       * been created or if an error occured.
       */

      Example:

      zip(['file1.jpg', 'file2.png', 'file4.mp3'], 'idk.zip', (err) => {
        // err is given to the callback as an argument.
        // It is either null (= no error) or an Error instance (= error)
        if (err) throw err;
      });
    • unzip (src, dest, callback): function

      /**
       * Extract a zip archive to a specified location.
       * @param {string} src - The zip archive filepath to be extracted.
       * @param {string} dest - The directory path to extract the zip archive to.
       * @param {Function} callback - The function called after the zip archive has
       * been extracted or if an error occured.
       */

      Example:

      unzip('idk.zip', 'a-directory', (err) => {
        // err is given to the callback as an argument.
        // It is either null (= no error) or an Error instance (= error)
        if (err) throw err;
      });

<3.