mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-01-31 15:27:50 +00:00
16 lines
444 B
JavaScript
16 lines
444 B
JavaScript
import isArguments from './isArguments.js';
|
|
|
|
/**
|
|
* Checks if `value` is a flattenable `arguments` object or array.
|
|
*
|
|
* @private
|
|
* @param {*} value The value to check.
|
|
* @returns {boolean} Returns `true` if `value` is flattenable, else `false`.
|
|
*/
|
|
function isFlattenable(value) {
|
|
return Array.isArray(value) || isArguments(value) ||
|
|
!!(Symbol.isConcatSpreadable && value && value[spreadableSymbol]);
|
|
}
|
|
|
|
export default isFlattenable;
|