Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lib: change var to let in internal/streams #30430

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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