diff options
author | Ruben Bridgewater <ruben@bridgewater.de> | 2019-03-22 03:44:26 +0100 |
---|---|---|
committer | Ruben Bridgewater <ruben@bridgewater.de> | 2019-03-27 17:20:06 +0100 |
commit | b08a867d6016ccf04783a0f91fdbcc3460daf234 (patch) | |
tree | 5df4b30220cde5ae5eac9ed956c9badac6ba08af /test/parallel/test-stream3-pause-then-read.js | |
parent | fd992e6e36bb4b01a6ceb71cfeb3bae640b492a6 (diff) | |
download | android-node-v8-b08a867d6016ccf04783a0f91fdbcc3460daf234.tar.gz android-node-v8-b08a867d6016ccf04783a0f91fdbcc3460daf234.tar.bz2 android-node-v8-b08a867d6016ccf04783a0f91fdbcc3460daf234.zip |
benchmark,doc,lib: capitalize more comments
PR-URL: https://github.com/nodejs/node/pull/26849
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Diffstat (limited to 'test/parallel/test-stream3-pause-then-read.js')
-rw-r--r-- | test/parallel/test-stream3-pause-then-read.js | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/test/parallel/test-stream3-pause-then-read.js b/test/parallel/test-stream3-pause-then-read.js index b86c015706..bfd8a20373 100644 --- a/test/parallel/test-stream3-pause-then-read.js +++ b/test/parallel/test-stream3-pause-then-read.js @@ -56,7 +56,7 @@ function push() { read100(); -// first we read 100 bytes +// First we read 100 bytes. function read100() { readn(100, onData); } @@ -77,7 +77,7 @@ function readn(n, then) { })(); } -// Then we listen to some data events +// Then we listen to some data events. function onData() { expectEndingData -= 100; console.error('onData'); @@ -85,24 +85,24 @@ function onData() { r.on('data', function od(c) { seen += c.length; if (seen >= 100) { - // seen enough + // Seen enough r.removeListener('data', od); r.pause(); if (seen > 100) { - // oh no, seen too much! - // put the extra back. + // Oh no, seen too much! + // Put the extra back. const diff = seen - 100; r.unshift(c.slice(c.length - diff)); console.error('seen too much', seen, diff); } - // Nothing should be lost in between + // Nothing should be lost in-between. setImmediate(pipeLittle); } }); } -// Just pipe 200 bytes, then unshift the extra and unpipe +// Just pipe 200 bytes, then unshift the extra and unpipe. function pipeLittle() { expectEndingData -= 200; console.error('pipe a little'); @@ -130,14 +130,14 @@ function pipeLittle() { r.pipe(w); } -// now read 1234 more bytes +// Now read 1234 more bytes. function read1234() { readn(1234, resumePause); } function resumePause() { console.error('resumePause'); - // Don't read anything, just resume and re-pause a whole bunch + // Don't read anything, just resume and re-pause a whole bunch. r.resume(); r.pause(); r.resume(); |