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

multipipe

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

multipipe - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

9

History.md
0.0.1 / 2013-01-15
0.0.2 / 2014-02-20
==================
* fix infinite loop
0.0.1 / 2014-01-15
==================
* fix error bubbling
0.0.0 / 2013-01-13
0.0.0 / 2014-01-13
==================
* initial release

@@ -52,3 +52,3 @@

if (next) stream.pipe(next);
stream.on('error', ret.emit.bind(ret, 'error'));
if (stream != ret) stream.on('error', ret.emit.bind(ret, 'error'));
});

@@ -55,0 +55,0 @@

{
"name": "multipipe",
"version": "0.0.1",
"version": "0.0.2",
"description": "pipe streams with centralized error handling",

@@ -15,2 +15,2 @@ "repository": "segmentio/multipipe",

}
}
}

@@ -38,21 +38,44 @@ var assert = require('assert');

});
it('should aggregate errors', function(done){
var a = Transform();
var b = Transform();
var c = Transform();
var stream = pipe(a, b, c);
var err = new Error;
var i = 0;
stream.on('error', function(_err){
i++;
assert.equal(_err, err);
assert(i <= 3);
if (i == 3) done();
describe('errors', function(){
it('should reemit', function(done){
var a = Transform();
var b = Transform();
var c = Transform();
var stream = pipe(a, b, c);
var err = new Error;
var i = 0;
stream.on('error', function(_err){
i++;
assert.equal(_err, err);
assert(i <= 3);
if (i == 3) done();
});
a.emit('error', err);
b.emit('error', err);
c.emit('error', err);
});
a.emit('error', err);
b.emit('error', err);
c.emit('error', err);
it('should not reemit endlessly', function(done){
var a = Transform();
var b = Transform();
var c = Transform();
c.readable = false;
var stream = pipe(a, b, c);
var err = new Error;
var i = 0;
stream.on('error', function(_err){
i++;
assert.equal(_err, err);
assert(i <= 3);
if (i == 3) done();
});
a.emit('error', err);
b.emit('error', err);
c.emit('error', err);
});
});

@@ -59,0 +82,0 @@ });

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