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

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.18 to 1.1.19

22

lib/pipe.js
(function () {
'use strict';
var assert = require('assert');
var fs = require('fs'),
assert = require('assert');

@@ -37,3 +38,5 @@ module.exports = all;

setListeners(streams, options, onError);
callWhenOpen(write, function() {
setListeners(streams, options, onError);
});

@@ -71,2 +74,17 @@ read.on('error', onResultError);

}
/*
* when stream is fs.WriteStream
* finish event could be emitted before
* open and then everything crash
*/
function callWhenOpen(stream, fn) {
var isFsWrite = stream instanceof fs.WriteStream;
if (!isFsWrite)
fn();
else
stream.on('open', function() {
fn();
});
}

@@ -73,0 +91,0 @@ function setListeners(streams, options, fn) {

2

package.json
{
"name": "pipe-io",
"version": "1.1.18",
"version": "1.1.19",
"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