Skip to content
Permalink
Browse files

lib: change var to let in internal/streams

PR-URL: #30430
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
  • Loading branch information
marquicodes authored and MylesBorins committed Nov 12, 2019
1 parent cbb2f81 commit df2dce08aa6592863eb48101f628cb3a8f5858ce
Showing with 5 additions and 5 deletions.
  1. +4 −4 lib/internal/streams/buffer_list.js
  2. +1 −1 lib/internal/streams/legacy.js
@@ -48,8 +48,8 @@ module.exports = class BufferList {
join(s) {
if (this.length === 0)
return '';
var p = this.head;
var ret = '' + p.data;
let p = this.head;
let ret = '' + p.data;
while (p = p.next)
ret += s + p.data;
return ret;
@@ -59,8 +59,8 @@ module.exports = class BufferList {
if (this.length === 0)
return Buffer.alloc(0);
const ret = Buffer.allocUnsafe(n >>> 0);
var p = this.head;
var i = 0;
let p = this.head;
let i = 0;
while (p) {
ret.set(p.data, i);
i += p.data.length;
@@ -36,7 +36,7 @@ Stream.prototype.pipe = function(dest, options) {
source.on('close', onclose);
}

var didOnEnd = false;
let didOnEnd = false;
function onend() {
if (didOnEnd) return;
didOnEnd = true;

0 comments on commit df2dce0

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