Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on May 10, 2024 via pnpm

jszip 2.7.0

Create, read and edit .zip files with Javascript http://stuartk.com/jszip
Package summary
Share
2
issues
2
high severity
vulnerability
2
2
licenses
1
(MIT OR GPL-3.0)
1
(MIT AND Zlib)
Package created
11 Sep 2013
Version published
2 Aug 2022
Maintainers
3
Total deps
2
Direct deps
1
License
(MIT OR GPL-3.0)

Issues

2

2 high severity issues

high
Recommendation: Upgrade to version 3.8.0 or later
via: jszip@2.7.0
Recommendation: Upgrade to version 3.8.0 or later
via: jszip@2.7.0
Collapse
Expand

Licenses

(MIT OR GPL-3.0)

Permissive
1 Packages, Including:
jszip@2.7.0

(MIT AND Zlib)

Permissive
1 Packages, Including:
pako@1.0.11
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

1
All Dependencies CSV
β“˜ This is a list of jszip 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
pako1.0.11199.69 kB(MIT AND Zlib)
prod

Visualizations

Frequently Asked Questions

What does jszip do?

JSZip is a powerful JavaScript library that provides features for creating, reading, and editing .zip files with a simple and delightful API. The tool is widely used in client-side and server-side JavaScript applications for managing .zip files. Further insights can be found on the project's GitHub page at git+https://github.com/Stuk/jszip.git.

How do you use jszip?

Using JSZip is straightforward and requires just a few lines of code. To start, instantiate a new JSZip object. From there, you can create files and directories using the file and folder methods respectively. For instance, to create a 'Hello.txt' file containing 'Hello World', use zip.file("Hello.txt", "Hello World\n");. You can add images or other files using similar methods. To generate the zip, use the generateAsync method, as showcased in the example below.

const zip = new JSZip();

zip.file("Hello.txt", "Hello World\n");

const img = zip.folder("images");
img.file("smile.gif", imgData, {base64: true});

zip.generateAsync({type:"blob"}).then(function(content) {
    // see FileSaver.js
    saveAs(content, "example.zip");
});

The above script eventually results in a zip file containing 'Hello.txt' and 'images/smile.gif'.

Where are the jszip docs?

The comprehensive documentation for JSZip is available at the official documentation page https://stuk.github.io/jszip. The documentation covers a broad range of topics including installation, API reference, and several usage examples. Users are encouraged to explore the documentation to gain a better understanding and fully leverage the potential of JSZip.