Gathering detailed insights and metrics for node-zip
Gathering detailed insights and metrics for node-zip
Gathering detailed insights and metrics for node-zip
Gathering detailed insights and metrics for node-zip
npm install node-zip
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
217 Stars
26 Commits
38 Forks
9 Watching
1 Branches
4 Contributors
Updated on 15 Feb 2024
Minified
Minified + Gzipped
JavaScript (95.9%)
Shell (3.85%)
Makefile (0.25%)
Cumulative downloads
Total Downloads
Last day
14%
16,423
Compared to previous day
Last week
0.5%
83,852
Compared to previous week
Last month
8.7%
343,214
Compared to previous month
Last year
-4%
3,895,554
Compared to previous year
1
node-zip - Zip/Unzip files ported from JSZip
1npm install node-zip
1var fs = require('fs'); 2var path = require('path'); 3 4// The zip library needs to be instantiated: 5var zip = new require('node-zip')(); 6 7// You can add multiple files by performing subsequent calls to zip.file(); 8// the first argument is how you want the file to be named inside your zip, 9// the second is the actual data: 10zip.file('file1.txt', fs.readFileSync(path.join(__dirname, 'file1.txt'))); 11zip.file('file2.txt', fs.readFileSync(path.join(__dirname, 'file2.txt'))); 12 13var data = zip.generate({ base64:false, compression: 'DEFLATE' }); 14 15// it's important to use *binary* encode 16fs.writeFileSync('test.zip', data, 'binary');
You can also load directly:
1require('node-zip'); 2var zip = new JSZip(data, options) 3 ...
1var zip = new require('node-zip')(); 2 3zip.file('test.file', 'hello there'); 4var data = zip.generate({base64:false,compression:'DEFLATE'}); 5console.log(data); // ugly data
1var zip = new require('node-zip')(data, {base64: false, checkCRC32: true}); 2console.log(zip.files['test.file']); // hello there
1var fs = require("fs"); 2zip.file('test.txt', 'hello there'); 3var data = zip.generate({base64:false,compression:'DEFLATE'}); 4fs.writeFileSync('test.zip', data, 'binary');
1npm install -g jasmine-node 2jasmine-node test
node-zip uses JSZip, please refer to their website for further information: http://stuartk.com/jszip/
David Duponchel @dduponchel
Feel free to send your pull requests and contribute to this project
MIT
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
Found 6/24 approved changesets -- score normalized to 2
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
license file not detected
Details
Reason
project is not fuzzed
Details
Reason
security policy file not detected
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2024-11-25
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More