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

reduplexer

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

reduplexer - npm Package Compare versions

Comparing version 0.0.3 to 0.0.4

2

index.js

@@ -48,3 +48,3 @@ /*

assert(!this._readable, 'already hooked to a Writable')
assert(!this._writable, 'already hooked to a Writable')
assert(writable)

@@ -51,0 +51,0 @@ this._writable = writable

{
"name": "reduplexer",
"version": "0.0.3",
"version": "0.0.4",
"description": "Another Stream2 duplexer",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -125,2 +125,34 @@

test('late hook reversed', function(t) {
t.plan(2)
var writable = new stream.Writable()
, readable = new stream.Readable()
// nothing here, let's hook them up later
, instance = duplexer()
writable._write = function(chunk, enc, cb) {
t.equal(chunk.toString(), 'writable')
cb()
}
readable._read = function(n) {
this.push('readable')
this.push(null)
}
instance.on('data', function(chunk) {
t.equal(chunk.toString(), 'readable')
})
instance.end('writable')
// separate hooks for redable
instance.hookReadable(readable)
// and writable
instance.hookWritable(writable)
})
test('shortcut hook', function(t) {

@@ -127,0 +159,0 @@ t.plan(2)

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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