function fromArrayLike(obj) {
const length = obj.length;
const b = allocate(length);
- for (let i = 0; i < length; i++)
+ for (var i = 0; i < length; i++)
b[i] = obj[i] & 255;
return b;
}
Buffer.concat = function(list, length) {
+ var i;
if (!Array.isArray(list))
throw new TypeError('list argument must be an Array of Buffers.');
if (length === undefined) {
length = 0;
- for (let i = 0; i < list.length; i++)
+ for (i = 0; i < list.length; i++)
length += list[i].length;
} else {
length = length >>> 0;
var buffer = new Buffer(length);
var pos = 0;
- for (let i = 0; i < list.length; i++) {
+ for (i = 0; i < list.length; i++) {
var buf = list[i];
buf.copy(buffer, pos);
pos += buf.length;