Socket
Socket
Sign inDemoInstall

pumpify

Package Overview
Dependencies
14
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.5.0 to 1.5.1

4

index.js

@@ -43,2 +43,6 @@ var pump = require('pump')

ended = true
// pump ends after the last stream is not writable *but*
// pumpify still forwards the readable part so we need to catch errors
// still, so reenable autoDestroy in this case
if (self._autoDestroy === false) self._autoDestroy = true
self.uncork()

@@ -45,0 +49,0 @@ })

2

package.json
{
"name": "pumpify",
"version": "1.5.0",
"version": "1.5.1",
"description": "Combine an array of streams into a single duplex stream using pump and duplexify",

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

@@ -5,2 +5,3 @@ var tape = require('tape')

var stream = require('stream')
var duplexify = require('duplexify')

@@ -186,3 +187,3 @@ tape('basic', function(t) {

var ws = new stream.Writable()
var rs = new stream.Readable()
var rs = new stream.Readable({highWaterMark: 16})

@@ -192,4 +193,7 @@ ws._write = function (data, enc, cb) {

}
rs._read = function () {
this.push(Buffer.alloc(16 * 1024))
process.nextTick(function () {
rs.push('hello world')
})
}

@@ -212,1 +216,24 @@

})
tape('returns error from duplexify', function (t) {
var a = through()
var b = duplexify()
var s = pumpify()
s.setPipeline(a, b)
s.on('error', function (err) {
t.same(err.message, 'stop')
t.end()
})
s.write('data')
// Test passes if `.end()` is not called
s.end()
b.setWritable(through())
setImmediate(function () {
b.destroy(new Error('stop'))
})
})
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