stream-connect
Advanced tools
Comparing version 0.2.0 to 0.2.1
@@ -47,4 +47,8 @@ 'use strict' | ||
connected._read = function () {} | ||
connected.on('finish', function () { | ||
one.end() | ||
}) | ||
two.on('readable', function () { | ||
connected.push(this.read()) | ||
var chunk = this.read() | ||
connected.push(chunk) | ||
}) | ||
@@ -51,0 +55,0 @@ |
{ | ||
"name": "stream-connect", | ||
"author": "Lloyd Brookes <75pound@gmail.com>", | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"description": "Create a pipeline of connected streams", | ||
@@ -6,0 +6,0 @@ "repository": "https://github.com/75lb/stream-connect.git", |
@@ -92,1 +92,21 @@ var test = require('tape') | ||
}) | ||
test('connected stream emits correct events', function (t) { | ||
t.plan(4) | ||
var pass1 = PassThrough() | ||
var pass2 = PassThrough() | ||
var connected = streamConnect(pass1, pass2) | ||
connected | ||
.on('data', function () { | ||
t.pass('data called') | ||
}) | ||
.on('end', function () { | ||
t.pass('end received') | ||
}) | ||
.on('finish', function () { | ||
t.pass('finish received') | ||
}) | ||
connected.write('one') | ||
connected.end('two') | ||
}) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8769
160