Skip to content

Commit 6908a84

Browse files
Kyriakos Markakistargos
Kyriakos Markakis
authored andcommitted
lib: change var to let in internal/streams
PR-URL: #30430 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Denys Otrishko <[email protected]>
1 parent 8d9080a commit 6908a84

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

lib/internal/streams/buffer_list.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ module.exports = class BufferList {
4848
join(s) {
4949
if (this.length === 0)
5050
return '';
51-
var p = this.head;
52-
var ret = '' + p.data;
51+
let p = this.head;
52+
let ret = '' + p.data;
5353
while (p = p.next)
5454
ret += s + p.data;
5555
return ret;
@@ -59,8 +59,8 @@ module.exports = class BufferList {
5959
if (this.length === 0)
6060
return Buffer.alloc(0);
6161
const ret = Buffer.allocUnsafe(n >>> 0);
62-
var p = this.head;
63-
var i = 0;
62+
let p = this.head;
63+
let i = 0;
6464
while (p) {
6565
ret.set(p.data, i);
6666
i += p.data.length;

lib/internal/streams/legacy.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Stream.prototype.pipe = function(dest, options) {
3636
source.on('close', onclose);
3737
}
3838

39-
var didOnEnd = false;
39+
let didOnEnd = false;
4040
function onend() {
4141
if (didOnEnd) return;
4242
didOnEnd = true;

0 commit comments

Comments
 (0)