* No unneeded empty arrays in transform spread Since Array.prototype.concat creates a new array from inputs, there's no need to call it from a new empty array ([].concat()). * [fixup] simplify detection of new array
8 lines
172 B
JavaScript
8 lines
172 B
JavaScript
function foo() {
|
|
for (var _len = arguments.length, bar = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
bar[_key] = arguments[_key];
|
|
}
|
|
|
|
return bar.concat();
|
|
}
|