Comparing version 5.0.0 to 5.0.1
{ | ||
"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 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
48762