<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">/** Used as references for various `Number` constants. */
var MAX_SAFE_INTEGER = 9007199254740991;

/**
 * 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).
 *
 * @static
 * @memberOf _
 * @since 4.0.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
 * @example
 *
 * _.isLength(3);
 * // =&gt; true
 *
 * _.isLength(Number.MIN_VALUE);
 * // =&gt; false
 *
 * _.isLength(Infinity);
 * // =&gt; false
 *
 * _.isLength('3');
 * // =&gt; false
 */
function isLength(value) {
  return typeof value == 'number' &amp;&amp;
    value &gt; -1 &amp;&amp; value % 1 == 0 &amp;&amp; value &lt;= MAX_SAFE_INTEGER;
}

module.exports = isLength;
</pre></body></html>