diff options
Diffstat (limited to 'lib/_stream_readable.js')
-rw-r--r-- | lib/_stream_readable.js | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/_stream_readable.js b/lib/_stream_readable.js index 957f232b63..968c7b258c 100644 --- a/lib/_stream_readable.js +++ b/lib/_stream_readable.js @@ -190,7 +190,7 @@ Object.defineProperty(Readable.prototype, 'destroyed', { return this._readableState.destroyed; }, set(value) { - // we ignore the value if the stream + // We ignore the value if the stream // has not been initialized yet if (!this._readableState) { return; @@ -600,7 +600,7 @@ function maybeReadMore_(stream, state) { debug('maybeReadMore read 0'); stream.read(0); if (len === state.length) - // didn't get any data, stop spinning. + // Didn't get any data, stop spinning. break; } state.readingMore = false; @@ -741,7 +741,7 @@ Readable.prototype.pipe = function(dest, pipeOpts) { src.unpipe(dest); } - // tell the dest that it's being piped to + // Tell the dest that it's being piped to dest.emit('pipe', src); // Start the flow if it hasn't been started already. @@ -793,7 +793,7 @@ Readable.prototype.unpipe = function(dest) { return this; } - // slow case. multiple pipe destinations. + // Slow case with multiple pipe destinations. if (!dest) { // remove all. @@ -896,7 +896,7 @@ function updateReadableListening(self) { // the upcoming resume will not flow. state.flowing = true; - // crude way to check if we should resume + // Crude way to check if we should resume } else if (self.listenerCount('data') > 0) { self.resume(); } @@ -1008,7 +1008,7 @@ Readable.prototype.wrap = function(stream) { } } - // proxy certain important events. + // Proxy certain important events. for (var n = 0; n < kProxyEvents.length; n++) { stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n])); } @@ -1070,7 +1070,7 @@ Object.defineProperty(Readable.prototype, 'readableFlowing', { } }); -// exposed for testing purposes only. +// Exposed for testing purposes only. Readable._fromList = fromList; Object.defineProperty(Readable.prototype, 'readableLength', { @@ -1096,7 +1096,7 @@ function fromList(n, state) { if (state.objectMode) ret = state.buffer.shift(); else if (!n || n >= state.length) { - // read it all, truncate the list + // Read it all, truncate the list if (state.decoder) ret = state.buffer.join(''); else if (state.buffer.length === 1) |