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

duplexify

Package Overview
Dependencies
Maintainers
1
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

duplexify - npm Package Compare versions

Comparing version 3.0.0 to 3.0.1

6

index.js

@@ -25,2 +25,6 @@ var stream = require('stream')

var toStreams2 = function(rs) {
return new (stream.Readable)({objectMode:true, highWaterMark:16}).wrap(rs)
}
var Duplexify = function(writable, readable, opts) {

@@ -133,3 +137,3 @@ if (!(this instanceof Duplexify)) return new Duplexify(writable, readable, opts)

this._readable = readable
this._readable2 = readable._readableState ? readable : new (stream.Readable)().wrap(readable)
this._readable2 = readable._readableState ? readable : toStreams2(readable)
this._readable2.on('readable', onreadable)

@@ -136,0 +140,0 @@ this._readable2.on('end', onend)

2

package.json
{
"name": "duplexify",
"version": "3.0.0",
"version": "3.0.1",
"description": "Turn a writeable and readable stream into a streams2 duplex stream with support for async initialization and streams1/streams2 input",

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

@@ -221,2 +221,21 @@ var tape = require('tape')

dup.write('hello')
})
tape('cork', function(t) {
var passthrough = through()
var dup = duplexify(passthrough, passthrough)
var ok = false
dup.on('prefinish', function() {
dup.cork()
setTimeout(function() {
ok = true
dup.uncork()
}, 100)
})
dup.on('finish', function() {
t.ok(ok)
t.end()
})
dup.end()
})

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