stream-splicer
Advanced tools
Comparing version 1.0.1 to 1.0.2
@@ -6,2 +6,3 @@ var Duplex = require('readable-stream').Duplex; | ||
var isArray = require('isarray'); | ||
var indexof = require('indexof'); | ||
var wrap = require('readable-wrap'); | ||
@@ -80,3 +81,3 @@ | ||
stream.once('end', function () { | ||
var ix = self._streams.indexOf(stream); | ||
var ix = indexof(self._streams, stream); | ||
if (ix >= 0 && ix === self._streams.length - 1) { | ||
@@ -133,3 +134,3 @@ Duplex.prototype.push.call(self, null); | ||
stream.once('end', function () { | ||
var ix = self._streams.indexOf(stream); | ||
var ix = indexof(self._streams, stream); | ||
if (ix >= 0 && ix === self._streams.length - 1) { | ||
@@ -158,3 +159,3 @@ Duplex.prototype.push.call(self, null); | ||
Pipeline.prototype.indexOf = function (stream) { | ||
return this._streams.indexOf(stream); | ||
return indexof(this._streams, stream); | ||
}; | ||
@@ -161,0 +162,0 @@ |
{ | ||
"name": "stream-splicer", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "streaming pipeline with a mutable configuration", | ||
@@ -11,3 +11,4 @@ "main": "index.js", | ||
"readable-wrap": "^1.0.0", | ||
"through2": "^1.0.0" | ||
"through2": "^1.0.0", | ||
"indexof": "0.0.1" | ||
}, | ||
@@ -18,3 +19,4 @@ "devDependencies": { | ||
"concat-stream": "^1.4.6", | ||
"split": "~0.3.0" | ||
"split": "~0.3.0", | ||
"object-keys": "~0.5.1" | ||
}, | ||
@@ -21,0 +23,0 @@ "scripts": { |
@@ -11,5 +11,3 @@ var pipeline = require('../'); | ||
t.plan(Object.keys(expected).reduce(function (sum, key) { | ||
return sum + expected[key].length; | ||
}, 0) + 1); | ||
t.plan(3); | ||
@@ -16,0 +14,0 @@ var a = split(); |
@@ -13,5 +13,3 @@ var pipeline = require('../'); | ||
t.plan(Object.keys(expected).reduce(function (sum, key) { | ||
return sum + expected[key].length; | ||
}, 0)); | ||
t.plan(5 + 2 + 5); | ||
@@ -18,0 +16,0 @@ var a = split(); |
@@ -14,5 +14,3 @@ var pipeline = require('../'); | ||
t.plan(Object.keys(expected).reduce(function (sum, key) { | ||
return sum + expected[key].length; | ||
}, 0)); | ||
t.plan(2 + 4 + 4 + 4); | ||
@@ -19,0 +17,0 @@ var a = through.obj(function (x, enc, next) { |
@@ -13,5 +13,3 @@ var pipeline = require('../'); | ||
t.plan(Object.keys(expected).reduce(function (sum, key) { | ||
return sum + expected[key].length; | ||
}, 0) + 1); | ||
t.plan(4 + 2 + 2 + 1); | ||
@@ -18,0 +16,0 @@ var a = split(); |
@@ -14,5 +14,3 @@ var pipeline = require('../'); | ||
t.plan(Object.keys(expected).reduce(function (sum, key) { | ||
return sum + expected[key].length; | ||
}, 0)); | ||
t.plan(2 + 4 + 4 + 4); | ||
@@ -19,0 +17,0 @@ var a = through.obj(function (x, enc, next) { |
21897
6
5
510
+ Addedindexof@0.0.1
+ Addedindexof@0.0.1(transitive)