MCPcopy
hub / github.com/react-component/slider / getIndex

Function getIndex

src/util.ts:38–40  ·  view source on GitHub ↗
(value: T | T[], index: number)

Source from the content-addressed store, hash-verified

36
37/** Return index value if is list or return value directly */
38export function getIndex<T>(value: T | T[], index: number) {
39 return Array.isArray(value) ? value[index] : value;
40}

Callers 3

Handle.tsxFile · 0.90
index.tsxFile · 0.90
TracksFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected