MCPcopy Create free account
hub / github.com/activejs/activejs / normalizeIndex

Function normalizeIndex

packages/core/src/utils/funcs.ts:55–57  ·  view source on GitHub ↗
(index: number, arrLength: number)

Source from the content-addressed store, hash-verified

53 * @internal please do not use.
54 */
55export function normalizeIndex(index: number, arrLength: number): number {
56 return index < 0 ? (index < -arrLength ? 0 : arrLength + index) : index;
57}
58
59/**
60 * @internal please do not use.

Callers 4

setMethod · 0.90
getMethod · 0.90
list-unit.spec.tsFile · 0.90
sanitizeIndicesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected