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

streamx

Package Overview
Dependencies
Maintainers
1
Versions
63
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

streamx - npm Package Compare versions

Comparing version 2.11.3 to 2.12.0

1

index.js

@@ -606,2 +606,3 @@ const { EventEmitter } = require('events')

if (opts.read) this._read = opts.read
if (opts.eagerOpen) this.resume().pause()
}

@@ -608,0 +609,0 @@ }

2

package.json
{
"name": "streamx",
"version": "2.11.3",
"version": "2.12.0",
"description": "An iteration of the Node.js core streams with a series of improvements",

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

@@ -113,3 +113,4 @@ # streamx

byteLength: (data) => size, // optional function that calculates the byte size of input data
signal: abortController.signal // optional AbortSignal that triggers `.destroy` when on `abort`
signal: abortController.signal, // optional AbortSignal that triggers `.destroy` when on `abort`
eagerOpen: false // eagerly open the stream
}

@@ -116,0 +117,0 @@ ```

@@ -66,2 +66,33 @@ const tape = require('tape')

tape('lazy open', async function (t) {
let opened = false
const r = new Readable({
open (cb) {
opened = true
cb(null)
}
})
await nextImmediate()
t.notOk(opened)
r.push(null)
await nextImmediate()
t.ok(opened)
t.end()
})
tape('eager open', async function (t) {
let opened = false
const r = new Readable({
open (cb) {
opened = true
cb(null)
},
eagerOpen: true
})
await nextImmediate()
t.ok(opened)
r.push(null)
t.end()
})
tape('shorthands', function (t) {

@@ -68,0 +99,0 @@ t.plan(3 + 1)

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