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

bubble-stream-error

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

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

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
38K
decreased by-17.9%
Maintainers
1
Weekly downloads
 
Created
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

Package last updated on 26 Nov 2015

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc