mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-04 00:57:48 +00:00
Assume ES5+ built-ins exist.
This commit is contained in:
@@ -1,9 +1,5 @@
|
||||
import Symbol from './_Symbol.js';
|
||||
import isArguments from './isArguments.js';
|
||||
|
||||
/** Built-in value references. */
|
||||
const spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined;
|
||||
|
||||
/**
|
||||
* Checks if `value` is a flattenable `arguments` object or array.
|
||||
*
|
||||
@@ -13,7 +9,7 @@ const spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined;
|
||||
*/
|
||||
function isFlattenable(value) {
|
||||
return Array.isArray(value) || isArguments(value) ||
|
||||
!!(spreadableSymbol && value && value[spreadableSymbol]);
|
||||
!!(Symbol.isConcatSpreadable && value && value[spreadableSymbol]);
|
||||
}
|
||||
|
||||
export default isFlattenable;
|
||||
|
||||
Reference in New Issue
Block a user