benchmark,doc,lib,test: capitalize comments · nodejs/node@9edce1e (original) (raw)

`@@ -134,7 +134,7 @@ function ReadableState(options, stream, isDuplex) {

`

134

134

`// The number of writers that are awaiting a drain event in .pipe()s

`

135

135

`this.awaitDrain = 0;

`

136

136

``

137

``

`-

// if true, a maybeReadMore has been scheduled

`

``

137

`+

// If true, a maybeReadMore has been scheduled

`

138

138

`this.readingMore = false;

`

139

139

``

140

140

`this.decoder = null;

`

`@@ -189,7 +189,7 @@ Object.defineProperty(Readable.prototype, 'destroyed', {

`

189

189

`return;

`

190

190

`}

`

191

191

``

192

``

`-

// backward compatibility, the user is explicitly

`

``

192

`+

// Backward compatibility, the user is explicitly

`

193

193

`// managing destroyed

`

194

194

`this._readableState.destroyed = value;

`

195

195

`}

`

`@@ -669,7 +669,7 @@ Readable.prototype.pipe = function(dest, pipeOpts) {

`

669

669

`var cleanedUp = false;

`

670

670

`function cleanup() {

`

671

671

`debug('cleanup');

`

672

``

`-

// cleanup event handlers once the pipe is broken

`

``

672

`+

// Cleanup event handlers once the pipe is broken

`

673

673

`dest.removeListener('close', onclose);

`

674

674

`dest.removeListener('finish', onfinish);

`

675

675

`dest.removeListener('drain', ondrain);

`

`@@ -745,7 +745,7 @@ Readable.prototype.pipe = function(dest, pipeOpts) {

`

745

745

`// tell the dest that it's being piped to

`

746

746

`dest.emit('pipe', src);

`

747

747

``

748

``

`-

// start the flow if it hasn't been started already.

`

``

748

`+

// Start the flow if it hasn't been started already.

`

749

749

`if (!state.flowing) {

`

750

750

`debug('pipe resume');

`

751

751

`src.resume();

`

`@@ -772,13 +772,13 @@ Readable.prototype.unpipe = function(dest) {

`

772

772

`var state = this._readableState;

`

773

773

`var unpipeInfo = { hasUnpiped: false };

`

774

774

``

775

``

`-

// if we're not piping anywhere, then do nothing.

`

``

775

`+

// If we're not piping anywhere, then do nothing.

`

776

776

`if (state.pipesCount === 0)

`

777

777

`return this;

`

778

778

``

779

``

`-

// just one destination. most common case.

`

``

779

`+

// Just one destination. most common case.

`

780

780

`if (state.pipesCount === 1) {

`

781

``

`-

// passed in one, but it's not the right one.

`

``

781

`+

// Passed in one, but it's not the right one.

`

782

782

`if (dest && dest !== state.pipes)

`

783

783

`return this;

`

784

784

``

`@@ -824,7 +824,7 @@ Readable.prototype.unpipe = function(dest) {

`

824

824

`return this;

`

825

825

`};

`

826

826

``

827

``

`-

// set up data events if they are asked for

`

``

827

`+

// Set up data events if they are asked for

`

828

828

`// Ensure readable listeners eventually get something

`

829

829

`Readable.prototype.on = function(ev, fn) {

`

830

830

`const res = Stream.prototype.on.call(this, ev, fn);

`

`@@ -893,7 +893,7 @@ function updateReadableListening(self) {

`

893

893

`state.readableListening = self.listenerCount('readable') > 0;

`

894

894

``

895

895

`if (state.resumeScheduled && !state.paused) {

`

896

``

`-

// flowing needs to be set to true now, otherwise

`

``

896

`+

// Flowing needs to be set to true now, otherwise

`

897

897

`// the upcoming resume will not flow.

`

898

898

`state.flowing = true;

`

899

899

``

`@@ -914,7 +914,7 @@ Readable.prototype.resume = function() {

`

914

914

`var state = this._readableState;

`

915

915

`if (!state.flowing) {

`

916

916

`debug('resume');

`

917

``

`-

// we flow only if there is no one listening

`

``

917

`+

// We flow only if there is no one listening

`

918

918

`// for readable, but we still have to call

`

919

919

`// resume()

`

920

920

`state.flowing = !state.readableListening;

`

`@@ -984,7 +984,7 @@ Readable.prototype.wrap = function(stream) {

`

984

984

`if (state.decoder)

`

985

985

`chunk = state.decoder.write(chunk);

`

986

986

``

987

``

`-

// don't skip over falsy values in objectMode

`

``

987

`+

// Don't skip over falsy values in objectMode

`

988

988

`if (state.objectMode && (chunk === null || chunk === undefined))

`

989

989

`return;

`

990

990

`else if (!state.objectMode && (!chunk || !chunk.length))

`