tar-stream
Advanced tools
Comparing version 1.0.0 to 1.0.2
{ | ||
"name": "tar-stream", | ||
"version": "1.0.0", | ||
"version": "1.0.2", | ||
"description": "tar-stream is a streaming tar parser and generator and nothing else. It is streams2 and operates purely using streams which means you can easily extract/parse tarballs without ever hitting the file system.", | ||
@@ -47,2 +47,6 @@ "repository": { | ||
"main": "index.js", | ||
"files": [ | ||
"*.js", | ||
"LICENSE" | ||
], | ||
"directories": { | ||
@@ -49,0 +53,0 @@ "test": "test" |
@@ -28,3 +28,3 @@ # tar-stream | ||
var tar = require('tar-stream') | ||
var pack = tar.pack() // p is a streams2 stream | ||
var pack = tar.pack() // pack is a streams2 stream | ||
@@ -35,3 +35,3 @@ // add a file called my-test.txt with the content "Hello World!" | ||
// add a file called my-stream-test.txt from a stream | ||
var entry = pack.entry({ name: 'my-stream-test.txt' }, function(err) { | ||
var entry = pack.entry({ name: 'my-stream-test.txt', size: 11 }, function(err) { | ||
// the stream was added | ||
@@ -41,4 +41,8 @@ // no more entries | ||
}) | ||
myStream.pipe(entry) | ||
entry.write('hello') | ||
entry.write(' ') | ||
entry.write('world') | ||
entry.end() | ||
// pipe the pack stream somewhere | ||
@@ -120,6 +124,6 @@ pack.pipe(process.stdout) | ||
// pipe the old tarball to the extractor | ||
oldTarball.pipe(extract) | ||
oldTarballStream.pipe(extract) | ||
// pipe the new tarball the another stream | ||
pack.pipe(newTarball) | ||
pack.pipe(newTarballStream) | ||
``` | ||
@@ -126,0 +130,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
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
134
0
20313
7
495