MCPcopy Create free account
hub / github.com/5e-bits/5e-database / buildIndexMap

Function buildIndexMap

scripts/translationUtils.ts:24–30  ·  view source on GitHub ↗
(
  data: Record<string, unknown>[]
)

Source from the content-addressed store, hash-verified

22}
23
24export function buildIndexMap(
25 data: Record<string, unknown>[]
26): Map<string, Record<string, unknown>> {
27 return new Map(
28 data.filter((r) => typeof r.index === 'string').map((r) => [r.index as string, r])
29 );
30}
31
32/**
33 * Derives the English source filepath from a locale-nested filepath.

Callers 3

_processLangDirFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected