Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYash Ladha <yashladhapankajladha123@gmail.com>2020-10-21 04:14:36 +0300
committerGireesh Punathil <gpunathi@in.ibm.com>2020-10-25 15:11:21 +0300
commit364ac788e4b7342f6face7b65e6b14ac89b67f25 (patch)
tree5b70a376ce1dd4800d0509ee44528389e8217312
parent20a6ddc968ee81c88a20cf470d8dc71f24c81d95 (diff)
stream: remove redundant context from comments
Using the variable name in the comment and justifying the type seems redundant to me and instead it should defined the entity which it is acting, like in our case it is acting as a flag to control the flow in streams. PR-URL: https://github.com/nodejs/node/pull/35728 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Robert Nagy <ronagy@icloud.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
-rw-r--r--lib/internal/streams/from.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/internal/streams/from.js b/lib/internal/streams/from.js
index 13e8a73980d..949d0ceb6da 100644
--- a/lib/internal/streams/from.js
+++ b/lib/internal/streams/from.js
@@ -38,11 +38,11 @@ function from(Readable, iterable, opts) {
...opts
});
- // Reading boolean to protect against _read
+ // Flag to protect against _read
// being called before last iteration completion.
let reading = false;
- // needToClose boolean if iterator needs to be explicitly closed
+ // Flag for when iterator needs to be explicitly closed.
let needToClose = false;
readable._read = function() {