@newdash/newdash
Version:
javascript/typescript utility library
29 lines (28 loc) • 589 B
TypeScript
/**
* Checks if `value` is a valid array-like length.
*
* **Note:** This method is loosely based on
* [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
*
* @since 5.5.0
* @category Lang
* @param value The value to check.
* @returns Returns `true` if `value` is a valid length, else `false`.
* @example
*
* ```js
* isLength(3)
* // => true
*
* isLength(Number.MIN_VALUE)
* // => false
*
* isLength(Infinity)
* // => false
*
* isLength('3')
* // => false
* ```
*/
export declare function isLength(value: any): boolean;
export default isLength;