Skip to content

Commit

Permalink
stream: use standard for loop instead of for..of
Browse files Browse the repository at this point in the history
Use the standard `for` loop style instead of `for..of` for
consistency.

PR-URL: #41871
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Robert Nagy <[email protected]>
Reviewed-By: Darshan Sen <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Mestery <[email protected]>
Reviewed-By: Minwoo Jung <[email protected]>
  • Loading branch information
VoltrexKeyva authored and bengl committed Feb 22, 2022
1 parent d91a956 commit 07463b3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/internal/streams/duplex.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,10 @@ ObjectSetPrototypeOf(Duplex.prototype, Readable.prototype);
ObjectSetPrototypeOf(Duplex, Readable);

{
const keys = ObjectKeys(Writable.prototype);
// Allow the keys array to be GC'ed.
for (const method of ObjectKeys(Writable.prototype)) {
for (let i = 0; i < keys.length; i++) {
const method = keys[i];
if (!Duplex.prototype[method])
Duplex.prototype[method] = Writable.prototype[method];
}
Expand Down

0 comments on commit 07463b3

Please sign in to comment.