jszip-glob
v0.1.1
Published
Zip files by pattern
Downloads
10
Readme
jszip-glob
Zip files by Glob-pattern for JSZip.
Installation
npm i jszip-glob
Usage
const { zipFiles } = require('jszip-glob');
const JSZip = require('jszip');
zipFiles('glob/**/pattern', {
/*
* glob options.
*/
cwd: 'path/to/directory',
dot: false,
nodir: true,
nosort: true,
ignore: 'exclude/**/pattern',
/*
* JSZip instance.
*/
zip: new JSZip(),
/*
* JSZip options.
*/
compression: 'DEFLATE',
compressionOptions: {
level: 6,
},
}, (err, zip) => {
// Do something
});
License
MIT