Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gunzip-maybe

Package Overview
Dependencies
Maintainers
2
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gunzip-maybe - npm Package Compare versions

Comparing version 1.4.1 to 1.4.2

2

index.js

@@ -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",

@@ -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')
})
})
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