t-comm
Version:
专业、稳定、纯粹的工具库
9 lines (8 loc) • 332 B
TypeScript
/**
* Checks if `value` is a valid array-like index.
*
* @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`.
*/
export declare function isIndex(value: any, length?: number): boolean;