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 1.1.29 to 1.1.30

36

lib/pipe.js

@@ -41,2 +41,9 @@ (function () {

rmAll = function() {
rm('error', write, onWriteError);
rm('error', read, onReadError);
rm('end', read, onReadEnd);
rm('finish', write, onWriteFinish);
},
onWriteError = function(error) {

@@ -72,7 +79,9 @@ writeError = true;

if (options.end)
write.once('finish', onWriteFinish);
write.on('finish', onWriteFinish);
read.once('end', onReadEnd);
read.once('error', onReadError);
write.once('error', onWriteError);
read.on('end', onReadEnd);
read.on('error', onReadError);
write.on('error', onWriteError);
setListeners(streams, onError);

@@ -88,21 +97,13 @@ fullPipe(allStreams, options);

function onResult() {
var justEnd = end && !isFsWrite,
justFinish = write && !isFsRead,
bothFinish = end && finish;
if (readError && finish) {
rm('error', write, onWriteError);
rm('end', read, onReadEnd);
onEnd();
} else if (writeError && readError) {
rm('end', read, onReadEnd);
rm('finish', write, onWriteFinish);
onEnd();
} else if (writeError && end) {
rm('finish', write, onWriteFinish);
rm('error', read, onReadError);
onEnd();
} else if ((end && !isFsWrite) || (write && !isFsRead) || (write && end)) {
rm('error', read, onReadError);
rm('error', write, onWriteError);
} else if (bothFinish || justEnd || justFinish) {
onEnd();

@@ -113,2 +114,3 @@ }

function onEnd() {
rmAll();
unsetListeners(streams, onError);

@@ -115,0 +117,0 @@

{
"name": "pipe-io",
"version": "1.1.29",
"version": "1.1.30",
"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