Dependency-free JavaScript library for creating ZIP files (~1.2KB). Uses the CompressionStream API if available; otherwise will generate uncompressed ZIP.
const { createZip } = require("@litejs/zip");
const fileBlob = await createZip([
{ name: "file-a.txt", content: "Some content" },
{ name: "dir/file-b.txt", content: Uint8Array.from("012"), time: new Date(2020, 1, 21) },
])
Follow Coding Style Guide,
run tests npm install; npm test
.
Copyright (c) 2023-2024 Lauri Rooden <[email protected]>
MIT License | GitHub repo | npm package | Buy Me A Tea