Use new Array instead of Array for V8 optimization (#6250)
* Use new Array instead of Array for V8 optimization * fix spacing [skip ci] * Remove extraneous use strict clauses
This commit is contained in:
committed by
Justin Ridgewell
parent
24713e5040
commit
e98bb3dc60
@@ -3,4 +3,4 @@ exports.default = _toArray;
|
||||
|
||||
function _toArray(arr) {
|
||||
return Array.isArray(arr) ? arr : Array.from(arr);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,4 +7,4 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
||||
|
||||
function _toArray(arr) {
|
||||
return Array.isArray(arr) ? arr : (0, _from.default)(arr);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user