mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-04 08:57:49 +00:00
Use Array.isArray.
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import arrayPush from './_arrayPush.js';
|
||||
import isArray from './isArray.js';
|
||||
|
||||
/**
|
||||
* The base implementation of `getAllKeys` and `getAllKeysIn` which uses
|
||||
@@ -14,7 +13,7 @@ import isArray from './isArray.js';
|
||||
*/
|
||||
function baseGetAllKeys(object, keysFunc, symbolsFunc) {
|
||||
const result = keysFunc(object);
|
||||
return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
|
||||
return Array.isArray(object) ? result : arrayPush(result, symbolsFunc(object));
|
||||
}
|
||||
|
||||
export default baseGetAllKeys;
|
||||
|
||||
Reference in New Issue
Block a user