isArrayLike

Lang
since 4.0.0

Arguments

  • * The value to check.

Returns

boolean `true` if `value` is array-like, else `false`.

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.

Example of Lodash _.isArrayLike

_.isArrayLike([1, 2, 3]);
// => true

_.isArrayLike(document.body.children);
// => true

_.isArrayLike('abc');
// => true

_.isArrayLike(_.noop);
// => false