Socket
Socket
Sign inDemoInstall

pumpify

Package Overview
Dependencies
5
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.0 to 1.0.1

19

index.js
var pump = require('pump')
var duplexify = require('duplexify')
var Foo = function(proxy) {
this._proxy = proxy
}
Foo.prototype._e
var pumpifier = function(duplex) {

@@ -11,9 +17,14 @@ return function() {

var dup = duplex()
var w = first.writable ? first : null
var r = last.readable ? last : null
dup.setWritable(first.writable ? first : null)
dup.setReadable(last.readable ? last : null)
dup.setWritable(w)
dup.setReadable(r)
var onclose = function() {
if (!first.writable && first.destroy) first.destroy()
if (!last.readable && last.destroy) last.destroy()
for (var i = 0; i < streams.length; i++) {
if (!streams[i].destroy) continue;
// we only need to destroy one. pump will care of the others
if (streams[i] !== r && streams[i] !== w) streams[i].destroy()
}
}

@@ -20,0 +31,0 @@

{
"name": "pumpify",
"version": "1.0.0",
"version": "1.0.1",
"description": "Combine an array of streams into a single duplex stream using pump and duplexify",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc