2 * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer)
3 * of an array-like value.
5 var MAX_SAFE_INTEGER = 9007199254740991;
8 * Checks if `value` is a valid array-like length.
10 * **Note:** This function is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength).
13 * @param {*} value The value to check.
14 * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
16 function isLength(value) {
17 return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
20 module.exports = isLength;