All checks were successful
Build & Test / build-run (push) Successful in 41s
23 lines
549 B
TypeScript
23 lines
549 B
TypeScript
type Software = {
|
|
name: string,
|
|
nodeinfoName: string,
|
|
aliases: string[],
|
|
groups: string[],
|
|
forkOf?: string,
|
|
}
|
|
|
|
type Group = {
|
|
name: string,
|
|
aliases: string[],
|
|
}
|
|
|
|
type KnownSoftware = {
|
|
software: Record<string, Software>,
|
|
groups: Record<string, Group>,
|
|
}
|
|
|
|
export function getName(knownSoftware: KnownSoftware, id: string): string | undefined {
|
|
return knownSoftware.software[id]?.name ?? knownSoftware.groups[id].name;
|
|
}
|
|
|
|
export default await fetch("/known-software.json").then(r => r.json()) as KnownSoftware;
|