| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 2cbbaaf commit bdf933b
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -165,7 +165,7 @@ function fromString(string, encoding) { | |||
| 165 | 165 | function fromArrayLike(obj) { | |
| 166 | 166 | const length = obj.length; | |
| 167 | 167 | const b = allocate(length); | |
| 168 | - for (let i = 0; i < length; i++) | ||
| 168 | + for (var i = 0; i < length; i++) | ||
| 169 | 169 | b[i] = obj[i] & 255; | |
| 170 | 170 | return b; | |
| 171 | 171 | } | |
@@ -256,6 +256,7 @@ Buffer.isEncoding = function(encoding) { | |||
| 256 | 256 | ||
| 257 | 257 | ||
| 258 | 258 | Buffer.concat = function(list, length) { | |
| 259 | + var i; | ||
| 259 | 260 | if (!Array.isArray(list)) | |
| 260 | 261 | throw new TypeError('list argument must be an Array of Buffers'); | |
| 261 | 262 | ||
@@ -264,15 +265,15 @@ Buffer.concat = function(list, length) { | |||
| 264 | 265 | ||
| 265 | 266 | if (length === undefined) { | |
| 266 | 267 | length = 0; | |
| 267 | - for (let i = 0; i < list.length; i++) | ||
| 268 | + for (i = 0; i < list.length; i++) | ||
| 268 | 269 | length += list[i].length; | |
| 269 | 270 | } else { | |
| 270 | 271 | length = length >>> 0; | |
| 271 | 272 | } | |
| 272 | 273 | ||
| 273 | 274 | var buffer = Buffer.allocUnsafe(length); | |
| 274 | 275 | var pos = 0; | |
| 275 | - for (let i = 0; i < list.length; i++) { | ||
| 276 | + for (i = 0; i < list.length; i++) { | ||
| 276 | 277 | var buf = list[i]; | |
| 277 | 278 | if (!Buffer.isBuffer(buf)) | |
| 278 | 279 | throw new TypeError('list argument must be an Array of Buffers'); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments