Gogs df670eaa27 first commit 3 weeks ago
..
.github df670eaa27 first commit 3 weeks ago
dist df670eaa27 first commit 3 weeks ago
lib df670eaa27 first commit 3 weeks ago
node_modules df670eaa27 first commit 3 weeks ago
vendor df670eaa27 first commit 3 weeks ago
.codeclimate.yml df670eaa27 first commit 3 weeks ago
.editorconfig df670eaa27 first commit 3 weeks ago
.eslintrc.js df670eaa27 first commit 3 weeks ago
.jekyll-metadata df670eaa27 first commit 3 weeks ago
.travis.yml df670eaa27 first commit 3 weeks ago
CHANGES.md df670eaa27 first commit 3 weeks ago
LICENSE.markdown df670eaa27 first commit 3 weeks ago
README.markdown df670eaa27 first commit 3 weeks ago
deps.js df670eaa27 first commit 3 weeks ago
graph.svg df670eaa27 first commit 3 weeks ago
index.d.ts df670eaa27 first commit 3 weeks ago
package.json df670eaa27 first commit 3 weeks ago
sponsors.md df670eaa27 first commit 3 weeks ago
tsconfig.json df670eaa27 first commit 3 weeks ago

README.markdown

JSZip

A library for creating, reading and editing .zip files with JavaScript, with a lovely and simple API.

See https://stuk.github.io/jszip for all the documentation.

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");
});

/*
Results in a zip containing
Hello.txt
images/
    smile.gif
*/

License

JSZip is dual-licensed. You may use it under the MIT license or the GPLv3 license. See LICENSE.markdown.