Use Array.isArray.

This commit is contained in:
John-David Dalton
2017-01-09 18:44:38 -08:00
parent 395a81058b
commit 68190b8546
31 changed files with 34 additions and 64 deletions

View File

@@ -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;