This commit is contained in:
vcoppe
2026-10-04 19:14:41 +02:00
parent c536e6247b
commit 5e2f506120
19 changed files with 484 additions and 47 deletions
+12
View File
@@ -0,0 +1,12 @@
/**
* The value of a trackpoint for a category of the engine (surface, highway): `codes` has one entry
* per trackpoint, 0 when the value is unknown, else 1 + the index of the value in `names`.
*/
export function categoryAt(
codes: ArrayLike<number>,
names: readonly string[],
index: number
): string | undefined {
const code = codes[index];
return code ? names[code - 1] : undefined;
}