Skip to content

Commit

Permalink
stream: remove redundant context from comments
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
yashLadha committed Oct 21, 2020
1 parent 4f296d2 commit 2aa775a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/internal/streams/from.js
Expand Up @@ -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() {
Expand Down

0 comments on commit 2aa775a

Please sign in to comment.