zipit allows you to easily create zip archives from any combination of strings,
Buffers, files, directories, and other input types.
The following example creates a zip archive from a file, a directory, a Node.js
Buffer, and a string.
const Zipit = ;;
zipit exports a single function used to create zip archives.
options(object) - An object that configures the creation of the zip archive. The following schema is supported.
input(string, object, or array) - If this is a string, it represents the path to a file or directory to include in the zip archive. If this is an object, it should have
dataproperties which are used as the file name and contents in the zip archive. If this is an array, it should contain a combination of strings and objects as previously described.
cwd(string) - Specifies the working directory for relative file system operations. Defaults to
callback(function) - A function which is called after the zip archive is created, or an error occurs. This function takes the following arguments.
err(error) - Represents any error that occurs.
Buffer) - Contains the zip archive, represented as a Node.js