mirror of
https://github.com/nodejs/node.git
synced 2026-11-30 11:55:44 -05:00
lib: change var to let in internal/streams
PR-URL: https://github.com/nodejs/node/pull/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>
This commit is contained in:
1 parent
183464a24d
commit
f10608655b
2 files changed
+5
-5
No files matched your search
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user