_.isLength

_.isLength(value)

Checks if value is a valid array-like length.

Note: This method is loosely based on ToLength.

Since

4.0.0

Arguments

  1. value (*): The value to check.

Returns

(boolean): Returns true if value is a valid length, else false.

Example

_.isLength(3);
// => true
 
_.isLength(Number.MIN_VALUE);
// => false
 
_.isLength(Infinity);
// => false
 
_.isLength('3');
// => false
doc_Lodash
2016-11-27 16:38:10
Comments
Leave a Comment

Please login to continue.