Socket
Socket
Sign inDemoInstall

pipe-io

Package Overview
Dependencies
Maintainers
1
Versions
78
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pipe-io - npm Package Compare versions

Comparing version 2.0.3 to 2.0.4

60

legacy/pipe.js

@@ -8,5 +8,5 @@ 'use strict';

if (!callback) {
callback = options;
callback = options;
options = {
options = {
end: true

@@ -25,27 +25,27 @@ };

function pipe(allStreams, options, callback) {
var error, finish, end, open,
readError, writeError;
var error, finish, end, open;
var readError, writeError;
var streams = allStreams.slice();
var read = streams.shift();
var write = streams.pop(),
isGunzip = allStreams.some(function (write) {
return write instanceof zlib.Gunzip
}),
isGzip = allStreams.some(function (write) {
return write instanceof zlib.Gzip
}),
rm = function (event, stream, fn) {
stream.removeListener(event, fn);
},
rmAll = function () {
rm('error', write, onWriteError);
rm('error', read, onReadError);
rm('end', read, onReadEnd);
rm('finish', write, onWriteFinish);
};
var streams = allStreams.slice();
var read = streams.shift();
var write = streams.pop();
var isGunzip = allStreams.some(function (write) {
return write instanceof zlib.Gunzip
});
var isGzip = allStreams.some(function (write) {
return write instanceof zlib.Gzip
});
var rm = function (event, stream, fn) {
stream.removeListener(event, fn);
};
var rmAll = function () {
rm('error', write, onWriteError);
rm('error', read, onReadError);
rm('end', read, onReadEnd);
rm('finish', write, onWriteFinish);
};
read.on('end', onReadEnd);

@@ -57,7 +57,4 @@ read.on('error', onReadError);

read.on('readable', function () {
read.resume();
});
open = true;
open = true;
write.on('error', onWriteError);

@@ -71,2 +68,7 @@

finish = true;
read.on('readable', function () {
read.resume();
});
onError(error);

@@ -73,0 +75,0 @@ onResult();

@@ -8,5 +8,5 @@ 'use strict';

if (!callback) {
callback = options;
callback = options;
options = {
options = {
end: true

@@ -25,27 +25,27 @@ };

function pipe(allStreams, options, callback) {
let error, finish, end, open,
readError, writeError;
let error, finish, end, open;
let readError, writeError;
const streams = allStreams.slice();
const read = streams.shift();
const write = streams.pop(),
isGunzip = allStreams.some((write) => {
return write instanceof zlib.Gunzip
}),
isGzip = allStreams.some((write) => {
return write instanceof zlib.Gzip
}),
rm = (event, stream, fn) => {
stream.removeListener(event, fn);
},
rmAll = () => {
rm('error', write, onWriteError);
rm('error', read, onReadError);
rm('end', read, onReadEnd);
rm('finish', write, onWriteFinish);
};
const streams = allStreams.slice();
const read = streams.shift();
const write = streams.pop();
const isGunzip = allStreams.some((write) => {
return write instanceof zlib.Gunzip
});
const isGzip = allStreams.some((write) => {
return write instanceof zlib.Gzip
});
const rm = (event, stream, fn) => {
stream.removeListener(event, fn);
};
const rmAll = () => {
rm('error', write, onWriteError);
rm('error', read, onReadError);
rm('end', read, onReadEnd);
rm('finish', write, onWriteFinish);
};
read.on('end', onReadEnd);

@@ -57,7 +57,4 @@ read.on('error', onReadError);

read.on('readable', () => {
read.resume();
});
open = true;
open = true;
write.on('error', onWriteError);

@@ -71,2 +68,7 @@

finish = true;
read.on('readable', () => {
read.resume();
});
onError(error);

@@ -73,0 +75,0 @@ onResult();

{
"name": "pipe-io",
"version": "2.0.3",
"version": "2.0.4",
"author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",

@@ -5,0 +5,0 @@ "description": "Pipe streams and handle events",

Sorry, the diff of this file is not supported yet

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