readable-stream
Advanced tools
Comparing version 3.0.1 to 3.0.2
@@ -384,3 +384,3 @@ // Copyright Joyent, Inc. and other Node contributors. | ||
// the 'readable' event and move on. | ||
if (n === 0 && state.needReadable && (state.length >= state.highWaterMark || state.ended)) { | ||
if (n === 0 && state.needReadable && ((state.highWaterMark !== 0 ? state.length >= state.highWaterMark : state.length > 0) || state.ended)) { | ||
debug('read: emitReadable', state.length, state.ended); | ||
@@ -772,2 +772,3 @@ if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this); | ||
state.emittedReadable = false; | ||
debug('on readable', state.length, state.reading); | ||
if (state.length) { | ||
@@ -774,0 +775,0 @@ emitReadable(this); |
@@ -5,10 +5,12 @@ 'use strict'; | ||
var Buffer = require('buffer').Buffer; | ||
var util = require('util'); | ||
var _require = require('buffer'), | ||
Buffer = _require.Buffer; | ||
var _require = require('util'), | ||
inspect = _require.inspect; | ||
var _require2 = require('util'), | ||
inspect = _require2.inspect; | ||
var custom = inspect && custom || 'inspect'; | ||
function copyBuffer(src, target, offset) { | ||
src.copy(target, offset); | ||
Buffer.prototype.copy.call(src, target, offset); | ||
} | ||
@@ -156,3 +158,3 @@ | ||
BufferList.prototype[inspect.custom] = function () { | ||
BufferList.prototype[custom] = function () { | ||
var obj = inspect({ length: this.length }); | ||
@@ -163,9 +165,2 @@ return this.constructor.name + ' ' + obj; | ||
return BufferList; | ||
}(); | ||
if (util && util.inspect && util.inspect.custom) { | ||
module.exports.prototype[util.inspect.custom] = function () { | ||
var obj = util.inspect({ length: this.length }); | ||
return this.constructor.name + ' ' + obj; | ||
}; | ||
} | ||
}(); |
{ | ||
"name": "readable-stream", | ||
"version": "3.0.1", | ||
"version": "3.0.2", | ||
"description": "Streams3, a user-land copy of the stream library from Node.js", | ||
@@ -5,0 +5,0 @@ "main": "readable.js", |
@@ -18,3 +18,3 @@ # readable-stream | ||
Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v10.8.0/docs/api/stream.html). | ||
Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v10.9.0/docs/api/stream.html). | ||
@@ -21,0 +21,0 @@ If you want to guarantee a stable streams base, regardless of what version of |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
113563
2569