diff options
author | Ruben Bridgewater <ruben@bridgewater.de> | 2019-03-07 01:03:53 +0100 |
---|---|---|
committer | Ruben Bridgewater <ruben@bridgewater.de> | 2019-03-10 00:44:40 +0100 |
commit | f8763bb077db2f0be74e353c0b4f9e353c0fffa8 (patch) | |
tree | c73128074daa65d2e72e4d2a86a5b08059888144 /lib/internal/streams | |
parent | 01a5300f3f4f788a043f6b5fe72e2b7b641dfb6c (diff) | |
download | android-node-v8-f8763bb077db2f0be74e353c0b4f9e353c0fffa8.tar.gz android-node-v8-f8763bb077db2f0be74e353c0b4f9e353c0fffa8.tar.bz2 android-node-v8-f8763bb077db2f0be74e353c0b4f9e353c0fffa8.zip |
benchmark,doc,lib,test: capitalize comments
PR-URL: https://github.com/nodejs/node/pull/26483
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Michaƫl Zasso <targos@protonmail.com>
Diffstat (limited to 'lib/internal/streams')
-rw-r--r-- | lib/internal/streams/async_iterator.js | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/internal/streams/async_iterator.js b/lib/internal/streams/async_iterator.js index 810132c0cb..0d22e4efee 100644 --- a/lib/internal/streams/async_iterator.js +++ b/lib/internal/streams/async_iterator.js @@ -85,10 +85,9 @@ const ReadableStreamAsyncIteratorPrototype = Object.setPrototypeOf({ }); } - // if we have multiple next() calls - // we will wait for the previous Promise to finish - // this logic is optimized to support for await loops, - // where next() is only called once at a time + // If we have multiple next() calls we will wait for the previous Promise to + // finish. This logic is optimized to support for await loops, where next() + // is only called once at a time. const lastPromise = this[kLastPromise]; let promise; @@ -96,7 +95,7 @@ const ReadableStreamAsyncIteratorPrototype = Object.setPrototypeOf({ promise = new Promise(wrapForNext(lastPromise, this)); } else { // Fast path needed to support multiple this.push() - // without triggering the next() queue + // without triggering the next() queue. const data = this[kStream].read(); if (data !== null) { return Promise.resolve(createIterResult(data, false)); @@ -136,7 +135,7 @@ const createReadableStreamAsyncIterator = (stream) => { value: stream._readableState.endEmitted, writable: true }, - // the function passed to new Promise + // The function passed to new Promise // is cached so we avoid allocating a new // closure at every run [kHandlePromise]: { |