MCPcopy Create free account
hub / github.com/RubyLouvre/anu / isLength

Function isLength

test/babel.js:22109–22111  ·  view source on GitHub ↗

* 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 {b

(value)

Source from the content-addressed store, hash-verified

22107 * // => false
22108 */
22109 function isLength(value) {
22110 return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
22111 }
22112
22113 module.exports = isLength;
22114

Callers 3

isArrayLikeFunction · 0.85
hasPathFunction · 0.85
baseIsTypedArrayFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected