Socket
Socket
Sign inDemoInstall

bubble-stream-error

Package Overview
Dependencies
3
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    bubble-stream-error

Bubble errors from an array of streams to a master/top stream


Version published
Weekly downloads
55K
increased by26.17%
Maintainers
1
Install size
21.6 kB
Created
Weekly downloads
 

Readme

Source

bubble-stream-error

Node module for bubbling errors from 'sub-streams' to a master stream.

build status

examples

This is what you would normally do:

randomStream.pipe(colorizeStream).pipe(choppedStream).pipe(finalStream);

// assign an error handler on each stream
[randomStream, colorizeStream, choppedStream, finalStream].forEach(function(stream) {
  stream.on('error', function handleError(err) {
    // ...
  });
});

With bubble-stream-error:

var bubbleError = require('bubble-stream-error');

// ...

bubbleError(randomStream, colorizeStream, choppedStream, finalStream);
randomStream.pipe(colorizeStream).pipe(choppedStream).pipe(finalStream);

// assign a single error handler instead of 4
finalStream.on('error', function handleAllStreamErrors(err) {
  // ...
});

tests

npm test

License

MIT

Keywords

FAQs

Last updated on 26 Nov 2015

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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