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>
marquicodes authored and BridgeAR committed Nov 19, 2019
1 parent 183464a commit f106086
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
@@ -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;
2 changes: 1 addition & 1 deletion lib/internal/streams/legacy.js
Original file line number Diff line number Diff line change
@@ -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 f106086

Please sign in to comment.