mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-05 09:27:49 +00:00
Remove semicolons.
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
/** Used as references for various `Number` constants. */
|
||||
const MAX_SAFE_INTEGER = 9007199254740991;
|
||||
const MAX_SAFE_INTEGER = 9007199254740991
|
||||
|
||||
/** Used to detect unsigned integer values. */
|
||||
const reIsUint = /^(?:0|[1-9]\d*)$/;
|
||||
const reIsUint = /^(?:0|[1-9]\d*)$/
|
||||
|
||||
/**
|
||||
* Checks if `value` is a valid array-like index.
|
||||
@@ -13,10 +13,10 @@ const reIsUint = /^(?:0|[1-9]\d*)$/;
|
||||
* @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
|
||||
*/
|
||||
function isIndex(value, length) {
|
||||
length = length == null ? MAX_SAFE_INTEGER : length;
|
||||
length = length == null ? MAX_SAFE_INTEGER : length
|
||||
return !!length &&
|
||||
(typeof value == 'number' || reIsUint.test(value)) &&
|
||||
(value > -1 && value % 1 == 0 && value < length);
|
||||
(value > -1 && value % 1 == 0 && value < length)
|
||||
}
|
||||
|
||||
export default isIndex;
|
||||
export default isIndex
|
||||
|
||||
Reference in New Issue
Block a user