Skip to content
Permalink
Browse files

stream: replace var with let

PR-URL: #30379
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
  • Loading branch information
daern91 authored and MylesBorins committed Nov 12, 2019
1 parent 2f4069a commit 8792147fd2651b5af824dc237e6d3a1cfc22fb41
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/internal/streams/end-of-stream.js
@@ -35,14 +35,14 @@ function eos(stream, opts, callback) {
if (!stream.writable) onfinish();
};

var writableEnded = stream._writableState && stream._writableState.finished;
let writableEnded = stream._writableState && stream._writableState.finished;
const onfinish = () => {
writable = false;
writableEnded = true;
if (!readable) callback.call(stream);
};

var readableEnded = stream.readableEnded ||
let readableEnded = stream.readableEnded ||
(stream._readableState && stream._readableState.endEmitted);
const onend = () => {
readable = false;

0 comments on commit 8792147

Please sign in to comment.
You can’t perform that action at this time.