gunzip-maybe
Advanced tools
Comparing version 1.4.1 to 1.4.2
@@ -15,3 +15,3 @@ var zlib = require('zlib') | ||
var gunzip = function (maxRecursion) { | ||
if (!(maxRecursion >= 0)) maxRecursion = 3 | ||
if (maxRecursion === undefined) maxRecursion = 3 | ||
@@ -18,0 +18,0 @@ return peek({newline: false, maxBuffer: 10}, function (data, swap) { |
{ | ||
"name": "gunzip-maybe", | ||
"description": "Transform stream that gunzips its input if it is gzipped and just echoes it if not", | ||
"version": "1.4.1", | ||
"version": "1.4.2", | ||
"repository": { | ||
@@ -6,0 +6,0 @@ "type": "git", |
14
test.js
@@ -57,1 +57,15 @@ var tape = require('tape') | ||
}) | ||
tape('limited recursion', function (t) { | ||
t.plan(1) | ||
fs.createReadStream(__filename) | ||
.pipe(zlib.createGzip()) | ||
.pipe(zlib.createGzip()) | ||
.pipe(gunzip(1)) | ||
.on('finish', function () { | ||
t.fail('should not finish') | ||
}) | ||
.on('error', function (err) { | ||
t.same(err.message, 'Maximum recursion reached') | ||
}) | ||
}) |
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
6067
106
7