MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / resolveLang

Function resolveLang

packages/react/src/lib/shiki.ts:140–147  ·  view source on GitHub ↗
(lang: string)

Source from the content-addressed store, hash-verified

138});
139
140export function resolveLang(lang: string): SupportedLang | null {
141 const l = lang.trim().toLowerCase();
142 if (supportedSet.has(l)) {
143 if (l in LANG_ALIASES) return LANG_ALIASES[l]!;
144 return l as SupportedLang;
145 }
146 return null;
147}
148
149export function isSupportedLang(lang: string): boolean {
150 return supportedSet.has(lang.trim().toLowerCase());

Callers 3

detectLanguageFunction · 0.90
useHighlightedFunction · 0.90
highlightFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected