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

Function computeLocaleDocuments

scripts/translationUtils.ts:19–22  ·  view source on GitHub ↗
(translationDocs: TranslationDocument[])

Source from the content-addressed store, hash-verified

17export type TranslationDocument = z.infer<typeof TranslationDocumentSchema>;
18
19export function computeLocaleDocuments(translationDocs: TranslationDocument[]): LocaleDocument[] {
20 const langs = new Set(translationDocs.map((d) => d.lang));
21 return Array.from(langs).map((lang) => ({ lang, updated_at: new Date() }));
22}
23
24export function buildIndexMap(
25 data: Record<string, unknown>[]

Callers 2

_refreshLocaleCollectionFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected