mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-06 01:47:48 +00:00
Use Array.isArray.
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import Symbol from './_Symbol.js';
|
||||
import isArguments from './isArguments.js';
|
||||
import isArray from './isArray.js';
|
||||
|
||||
/** Built-in value references. */
|
||||
const spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined;
|
||||
@@ -13,7 +12,7 @@ const spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined;
|
||||
* @returns {boolean} Returns `true` if `value` is flattenable, else `false`.
|
||||
*/
|
||||
function isFlattenable(value) {
|
||||
return isArray(value) || isArguments(value) ||
|
||||
return Array.isArray(value) || isArguments(value) ||
|
||||
!!(spreadableSymbol && value && value[spreadableSymbol]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user