@@ -133,7 +133,7 @@ function ReadableState(options, stream, isDuplex) {
133
133
// The number of writers that are awaiting a drain event in .pipe()s
134
134
this . awaitDrain = 0 ;
135
135
136
- // if true, a maybeReadMore has been scheduled
136
+ // If true, a maybeReadMore has been scheduled
137
137
this . readingMore = false ;
138
138
139
139
this . decoder = null ;
@@ -188,7 +188,7 @@ Object.defineProperty(Readable.prototype, 'destroyed', {
188
188
return ;
189
189
}
190
190
191
- // backward compatibility, the user is explicitly
191
+ // Backward compatibility, the user is explicitly
192
192
// managing destroyed
193
193
this . _readableState . destroyed = value ;
194
194
}
@@ -668,7 +668,7 @@ Readable.prototype.pipe = function(dest, pipeOpts) {
668
668
var cleanedUp = false ;
669
669
function cleanup ( ) {
670
670
debug ( 'cleanup' ) ;
671
- // cleanup event handlers once the pipe is broken
671
+ // Cleanup event handlers once the pipe is broken
672
672
dest . removeListener ( 'close' , onclose ) ;
673
673
dest . removeListener ( 'finish' , onfinish ) ;
674
674
dest . removeListener ( 'drain' , ondrain ) ;
@@ -744,7 +744,7 @@ Readable.prototype.pipe = function(dest, pipeOpts) {
744
744
// tell the dest that it's being piped to
745
745
dest . emit ( 'pipe' , src ) ;
746
746
747
- // start the flow if it hasn't been started already.
747
+ // Start the flow if it hasn't been started already.
748
748
if ( ! state . flowing ) {
749
749
debug ( 'pipe resume' ) ;
750
750
src . resume ( ) ;
@@ -771,13 +771,13 @@ Readable.prototype.unpipe = function(dest) {
771
771
var state = this . _readableState ;
772
772
var unpipeInfo = { hasUnpiped : false } ;
773
773
774
- // if we're not piping anywhere, then do nothing.
774
+ // If we're not piping anywhere, then do nothing.
775
775
if ( state . pipesCount === 0 )
776
776
return this ;
777
777
778
- // just one destination. most common case.
778
+ // Just one destination. most common case.
779
779
if ( state . pipesCount === 1 ) {
780
- // passed in one, but it's not the right one.
780
+ // Passed in one, but it's not the right one.
781
781
if ( dest && dest !== state . pipes )
782
782
return this ;
783
783
@@ -823,7 +823,7 @@ Readable.prototype.unpipe = function(dest) {
823
823
return this ;
824
824
} ;
825
825
826
- // set up data events if they are asked for
826
+ // Set up data events if they are asked for
827
827
// Ensure readable listeners eventually get something
828
828
Readable . prototype . on = function ( ev , fn ) {
829
829
const res = Stream . prototype . on . call ( this , ev , fn ) ;
@@ -892,7 +892,7 @@ function updateReadableListening(self) {
892
892
state . readableListening = self . listenerCount ( 'readable' ) > 0 ;
893
893
894
894
if ( state . resumeScheduled && ! state . paused ) {
895
- // flowing needs to be set to true now, otherwise
895
+ // Flowing needs to be set to true now, otherwise
896
896
// the upcoming resume will not flow.
897
897
state . flowing = true ;
898
898
@@ -913,7 +913,7 @@ Readable.prototype.resume = function() {
913
913
var state = this . _readableState ;
914
914
if ( ! state . flowing ) {
915
915
debug ( 'resume' ) ;
916
- // we flow only if there is no one listening
916
+ // We flow only if there is no one listening
917
917
// for readable, but we still have to call
918
918
// resume()
919
919
state . flowing = ! state . readableListening ;
@@ -983,7 +983,7 @@ Readable.prototype.wrap = function(stream) {
983
983
if ( state . decoder )
984
984
chunk = state . decoder . write ( chunk ) ;
985
985
986
- // don 't skip over falsy values in objectMode
986
+ // Don 't skip over falsy values in objectMode
987
987
if ( state . objectMode && ( chunk === null || chunk === undefined ) )
988
988
return ;
989
989
else if ( ! state . objectMode && ( ! chunk || ! chunk . length ) )
0 commit comments