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

stream-connect

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stream-connect - npm Package Compare versions

Comparing version 0.2.0 to 0.2.1

6

lib/stream-connect.js

@@ -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 @@

2

package.json
{
"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')
})
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