An open API service indexing awesome lists of open source software.

https://github.com/noah227/cozip


https://github.com/noah227/cozip

Last synced: 2 months ago
JSON representation

Awesome Lists containing this project

README

        

# cozip

> Cozy zip, an easy way to zip files based on [adm-zip](https://www.npmjs.com/package/adm-zip)

## Example

```js
const cozip = require("cozip")

cozip("./pack.zip",[
// [path, isFolder, filter],
["./", true, (p) => !p.endsWith(".tts") && !p.endsWith(".zip")],
], err => {
// if(err) ...
})
```

> tree

```
┬ index.js
│ pack.zip
│ test.js

├─logs
└─src
│ 1.txt
│ 2.txt
│ 3.tts

└─inner
ii.yml
```

> tree(zip file)

```
┬ index.js
│ test.js

├─logs
└─src
│ 1.txt
│ 2.txt

└─inner
ii.yml
```