https://github.com/litejs/zip
Dependency-free library for creating ZIP files in the browser
https://github.com/litejs/zip
zip
Last synced: 11 months ago
JSON representation
Dependency-free library for creating ZIP files in the browser
- Host: GitHub
- URL: https://github.com/litejs/zip
- Owner: litejs
- Created: 2023-08-08T09:37:56.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-10-17T20:04:12.000Z (over 1 year ago)
- Last Synced: 2024-10-20T06:29:37.212Z (over 1 year ago)
- Topics: zip
- Language: JavaScript
- Homepage: https://litejs.com
- Size: 8.79 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[1]: https://badgen.net/coveralls/c/github/litejs/zip
[2]: https://coveralls.io/r/litejs/zip
[3]: https://badgen.net/packagephobia/install/@litejs/zip
[4]: https://packagephobia.now.sh/result?p=@litejs/zip
[5]: https://badgen.net/badge/icon/Buy%20Me%20A%20Tea/orange?icon=kofi&label
[6]: https://www.buymeacoffee.com/lauriro
LiteJS Zip – [![Coverage][1]][2] [![Size][3]][4] [![Buy Me A Tea][5]][6]
==========
Dependency-free JavaScript library for creating ZIP files (~1.2KB).
Uses the CompressionStream API if available; otherwise will generate uncompressed ZIP.
Examples
--------
```javascript
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) },
])
```
## Contributing
Follow [Coding Style Guide](https://github.com/litejs/litejs/wiki/Style-Guide),
run tests `npm install; npm test`.
> Copyright (c) 2023-2024 Lauri Rooden <lauri@rooden.ee>
[MIT License](https://litejs.com/MIT-LICENSE.txt) |
[GitHub repo](https://github.com/litejs/zip) |
[npm package](https://npmjs.org/package/@litejs/zip) |
[Buy Me A Tea][6]