MCPcopy Create free account
hub / github.com/Oslonline/dithering-studio / getAlgorithmIdFromSlug

Function getAlgorithmIdFromSlug

src/utils/algorithmSlug.ts:9–15  ·  view source on GitHub ↗
(slug: string)

Source from the content-addressed store, hash-verified

7}
8
9export function getAlgorithmIdFromSlug(slug: string): number | undefined {
10 const normalized = slug.trim().toLowerCase();
11 for (const [id, s] of Object.entries(slugById)) {
12 if (s === normalized) return Number(id);
13 }
14 return undefined;
15}

Callers 1

AlgorithmDetailPageFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected