MCPcopy Create free account
hub / github.com/arktypeio/arktype / isArrayIndexKey

Function isArrayIndexKey

ark/fast-check/arbitraries/array.ts:10–13  ·  view source on GitHub ↗
(key: PropertyKey)

Source from the content-addressed store, hash-verified

8import type { Ctx } from "../fastCheckContext.ts"
9
10export const isArrayIndexKey = (key: PropertyKey): key is string =>
11 typeof key === "string" &&
12 /^(?:0|[1-9]\d*)$/.test(key) &&
13 Number(key) < 0xffffffff
14
15export type LengthBounds = {
16 min?: number

Callers 2

buildStructureArbitraryFunction · 0.90
hasFiniteMemberFunction · 0.90

Calls 1

testMethod · 0.80

Tested by

no test coverage detected