GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — buffer: changing let in for loops back to var · nodejs/node@bdf933b

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • lib
    • buffer.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎lib/buffer.js‎

Copy file name to clipboardExpand all lines: lib/buffer.js
+4-3Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ function fromString(string, encoding) {
165165
function fromArrayLike(obj) {
166166
const length = obj.length;
167167
const b = allocate(length);
168-
for (let i = 0; i < length; i++)
168+
for (var i = 0; i < length; i++)
169169
b[i] = obj[i] & 255;
170170
return b;
171171
}
@@ -256,6 +256,7 @@ Buffer.isEncoding = function(encoding) {
256256

257257

258258
Buffer.concat = function(list, length) {
259+
var i;
259260
if (!Array.isArray(list))
260261
throw new TypeError('list argument must be an Array of Buffers');
261262

@@ -264,15 +265,15 @@ Buffer.concat = function(list, length) {
264265

265266
if (length === undefined) {
266267
length = 0;
267-
for (let i = 0; i < list.length; i++)
268+
for (i = 0; i < list.length; i++)
268269
length += list[i].length;
269270
} else {
270271
length = length >>> 0;
271272
}
272273

273274
var buffer = Buffer.allocUnsafe(length);
274275
var pos = 0;
275-
for (let i = 0; i < list.length; i++) {
276+
for (i = 0; i < list.length; i++) {
276277
var buf = list[i];
277278
if (!Buffer.isBuffer(buf))
278279
throw new TypeError('list argument must be an Array of Buffers');

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.