Socket
Socket
Sign inDemoInstall

archiver

Package Overview
Dependencies
Maintainers
1
Versions
83
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

archiver - npm Package Compare versions

Comparing version 5.0.0 to 5.0.1

2

package.json
{
"name": "archiver",
"version": "5.0.0",
"version": "5.0.1",
"description": "a streaming interface for archive generation",

@@ -5,0 +5,0 @@ "homepage": "https://github.com/archiverjs/node-archiver",

# Archiver
a streaming interface for archive generation
A streaming interface for archive generation

@@ -17,8 +17,8 @@ Visit the [API documentation](https://www.archiverjs.com/) for a list of all methods available.

// require modules
var fs = require('fs');
var archiver = require('archiver');
const fs = require('fs');
const archiver = require('archiver');
// create a file to stream archive data to.
var output = fs.createWriteStream(__dirname + '/example.zip');
var archive = archiver('zip', {
const output = fs.createWriteStream(__dirname + '/example.zip');
const archive = archiver('zip', {
zlib: { level: 9 } // Sets the compression level.

@@ -60,3 +60,3 @@ });

// append a file from stream
var file1 = __dirname + '/file1.txt';
const file1 = __dirname + '/file1.txt';
archive.append(fs.createReadStream(file1), { name: 'file1.txt' });

@@ -68,3 +68,3 @@

// append a file from buffer
var buffer3 = Buffer.from('buff it!');
const buffer3 = Buffer.from('buff it!');
archive.append(buffer3, { name: 'file3.txt' });

@@ -71,0 +71,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc