tdesign-react
Version:
TDesign Component for React
43 lines (38 loc) • 987 B
JavaScript
/**
* tdesign v1.16.6
* (c) 2026 tdesign
* @license MIT
*/
;
var isFunction = require('./dep-8c9795f9.js');
var isLength = require('./dep-d24b94bc.js');
/**
* Checks if `value` is array-like. A value is considered array-like if it's
* not a function and has a `value.length` that's an integer greater than or
* equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is array-like, else `false`.
* @example
*
* _.isArrayLike([1, 2, 3]);
* // => true
*
* _.isArrayLike(document.body.children);
* // => true
*
* _.isArrayLike('abc');
* // => true
*
* _.isArrayLike(_.noop);
* // => false
*/
function isArrayLike(value) {
return value != null && isLength.isLength(value.length) && !isFunction.isFunction(value);
}
exports.isArrayLike = isArrayLike;
//# sourceMappingURL=dep-0652d2a6.js.map