From d1fd3f27e40d96eca746b99eebd5abff5a347b3c Mon Sep 17 00:00:00 2001 From: Yash Ladha Date: Wed, 21 Oct 2020 06:44:36 +0530 Subject: [PATCH] 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 Reviewed-By: Gireesh Punathil Reviewed-By: Robert Nagy Reviewed-By: Matteo Collina Reviewed-By: Anto Aravinth --- lib/internal/streams/from.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/internal/streams/from.js b/lib/internal/streams/from.js index 13e8a73980ddd1..949d0ceb6dae50 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() {