"I'm not in this world to live up to your expectations and you're not in this world to live up to mine." —Bruce Lee
import isLength from './isLength.js';
/**
* 检查 `value` 是否为类数组。
* 如果值不是函数并且具有大于或等于 `0` 且小于或等于 `Number.MAX_SAFE_INTEGER` 的整数的 `value.length`,则该值被视为类数组。
*
* @since 4.0.0
* @category Lang
* @param {*} value 需要检查的值
* @returns {boolean} 返回布尔值,true 表示类数组,否则为不
* @example
*
* isArrayLike([1, 2, 3])
* // => true
*
* isArrayLike(document.body.children)
* // => true
*
* isArrayLike('abc')
* // => true
*
* isArrayLike(Function)
* // => false
*/
function isArrayLike(value) {
return value != null && typeof value != 'function' && isLength(value.length);
}