mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-03 08:37:49 +00:00
Use Array.isArray.
This commit is contained in:
@@ -2,7 +2,6 @@ import arrayEach from './_arrayEach.js';
|
||||
import baseCreate from './_baseCreate.js';
|
||||
import baseForOwn from './_baseForOwn.js';
|
||||
import getPrototype from './_getPrototype.js';
|
||||
import isArray from './isArray.js';
|
||||
import isBuffer from './isBuffer.js';
|
||||
import isFunction from './isFunction.js';
|
||||
import isObject from './isObject.js';
|
||||
@@ -38,7 +37,7 @@ import isTypedArray from './isTypedArray.js';
|
||||
* // => { '1': ['a', 'c'], '2': ['b'] }
|
||||
*/
|
||||
function transform(object, iteratee, accumulator) {
|
||||
const isArr = isArray(object);
|
||||
const isArr = Array.isArray(object);
|
||||
const isArrLike = isArr || isBuffer(object) || isTypedArray(object);
|
||||
|
||||
if (accumulator == null) {
|
||||
|
||||
Reference in New Issue
Block a user