* Checks if `value` is a valid array-like index. * * @private * @param {*} value The value to check. * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
(value, length)
| 6353 | * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. |
| 6354 | */ |
| 6355 | function isIndex(value, length) { |
| 6356 | var type = typeof value; |
| 6357 | length = length == null ? MAX_SAFE_INTEGER : length; |
| 6358 | |
| 6359 | return !!length && |
| 6360 | (type == 'number' || |
| 6361 | (type != 'symbol' && reIsUint.test(value))) && |
| 6362 | (value > -1 && value % 1 == 0 && value < length); |
| 6363 | } |
| 6364 | |
| 6365 | /** |
| 6366 | * Checks if the given arguments are from an iteratee call. |
no outgoing calls
no test coverage detected