Socket
Socket
Sign inDemoInstall

ternary-stream

Package Overview
Dependencies
10
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.2.2 to 1.2.3

9

index.js

@@ -32,6 +32,8 @@ 'use strict';

// if condition is false
// pipe input to falseStream
// pipe input to falseStream
forkStream.b.pipe(falseStream);
// merge output with trueStream's output
mergedStream = mergeStream(falseStream, trueStream);
// redirect falseStream errors to mergedStream
falseStream.on('error', function(err) { mergedStream.emit('error', err); });
} else {

@@ -44,4 +46,9 @@ // if there's no 'else' condition

// redirect trueStream errors to mergedStream
trueStream.on('error', function(err) { mergedStream.emit('error', err); });
// send everything down-stream
mergedStream.pipe(outStream);
// redirect mergedStream errors to outStream
mergedStream.on('error', function(err) { outStream.emit('error', err); });

@@ -48,0 +55,0 @@ // consumers write in to forkStream, we write out to outStream

8

package.json
{
"name": "ternary-stream",
"description": "Fork stream based on passed condition, and collect down-stream",
"version": "1.2.2",
"version": "1.2.3",
"homepage": "https://github.com/robrich/ternary-stream",

@@ -22,5 +22,5 @@ "repository": "git://github.com/robrich/ternary-stream.git",

"devDependencies": {
"jshint": "^2.5.6",
"mocha": "^2.0.0",
"should": "^4.1.0"
"jshint": "^2.5.10",
"mocha": "^2.0.1",
"should": "^4.2.1"
},

@@ -27,0 +27,0 @@ "scripts": {

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