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 <[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]>
  • Loading branch information
marquicodes authored and BridgeAR committed Nov 19, 2019
1 parent 183464a commit f106086
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 f106086

Please sign in to comment.