isLength

Lang
since 4.0.0

Arguments

  • * The value to check.

Returns

boolean `true` if `value` is a valid length, else `false`.

Checks if value is a valid array-like length.

Note: This method is loosely based on ToLength.

Example of Lodash _.isLength

_.isLength(3);
// => true

_.isLength(Number.MIN_VALUE);
// => false

_.isLength(Infinity);
// => false

_.isLength('3');
// => false