Skip to content

Commit

Permalink
lib: change var to let in internal/streams
Browse files Browse the repository at this point in the history
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 targos committed Dec 1, 2019
1 parent 8d9080a commit 6908a84
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions lib/internal/streams/buffer_list.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion lib/internal/streams/legacy.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 6908a84

Please sign in to comment.