Socket
Socket
Sign inDemoInstall

readable-stream

Package Overview
Dependencies
Maintainers
6
Versions
103
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

readable-stream - npm Package Compare versions

Comparing version 3.1.1 to 3.2.0

14

lib/_stream_readable.js

@@ -144,3 +144,4 @@ // Copyright Joyent, Inc. and other Node contributors.

this.readableListening = false;
this.resumeScheduled = false; // Should close be emitted on destroy. Defaults to true.
this.resumeScheduled = false;
this.paused = true; // Should close be emitted on destroy. Defaults to true.

@@ -826,5 +827,10 @@ this.emitClose = options.emitClose !== false; // has it been destroyed

function updateReadableListening(self) {
self._readableState.readableListening = self.listenerCount('readable') > 0; // crude way to check if we should resume
var state = self._readableState;
state.readableListening = self.listenerCount('readable') > 0;
if (self.listenerCount('data') > 0) {
if (state.resumeScheduled && !state.paused) {
// flowing needs to be set to true now, otherwise
// the upcoming resume will not flow.
state.flowing = true; // crude way to check if we should resume
} else if (self.listenerCount('data') > 0) {
self.resume();

@@ -853,2 +859,3 @@ }

state.paused = false;
return this;

@@ -886,2 +893,3 @@ };

this._readableState.paused = true;
return this;

@@ -888,0 +896,0 @@ };

@@ -106,4 +106,4 @@ // Copyright Joyent, Inc. and other Node contributors.

// However, some cases require setting options to different
// values for the readable and the writable sides of the duplex stream.
// These options can be provided separately as readableXXX and writableXXX.
// values for the readable and the writable sides of the duplex stream,
// e.g. options.readableObjectMode vs. options.writableObjectMode, etc.

@@ -449,3 +449,3 @@ if (typeof isDuplex !== 'boolean') isDuplex = stream instanceof Duplex; // object stream flag to indicate whether or not this stream

// Check if we're actually ready to finish, but don't emit yet
var finished = needFinish(state);
var finished = needFinish(state) || stream.destroyed;

@@ -452,0 +452,0 @@ if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) {

{
"name": "readable-stream",
"version": "3.1.1",
"version": "3.2.0",
"description": "Streams3, a user-land copy of the stream library from Node.js",

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

var Stream = require('stream');
if (process.env.READABLE_STREAM === 'disable' && Stream) {
module.exports = Stream;
exports = module.exports = Stream.Readable;
exports.Readable = Stream.Readable;
exports.Writable = Stream.Writable;
exports.Duplex = Stream.Duplex;
exports.Transform = Stream.Transform;
exports.PassThrough = Stream.PassThrough;
exports.Stream = Stream;
module.exports = Stream.Readable;
Object.assign(module.exports, Stream);
module.exports.Stream = Stream;
} else {

@@ -12,0 +7,0 @@ exports = module.exports = require('./lib/_stream_readable.js');

@@ -18,3 +18,3 @@ # readable-stream

Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v10.14.2/docs/api/stream.html).
Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v10.15.2/docs/api/stream.html).

@@ -21,0 +21,0 @@ If you want to guarantee a stable streams base, regardless of what version of

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