MCPcopy Create free account
hub / github.com/xerrors/Yuxi / normalizeCodeLanguage

Function normalizeCodeLanguage

web/src/utils/file_preview.js:25–32  ·  view source on GitHub ↗
(lang)

Source from the content-addressed store, hash-verified

23}
24
25export const normalizeCodeLanguage = (lang) => {
26 const language = String(lang || '')
27 .trim()
28 .split(/[\s:,]/)[0]
29 .toLowerCase()
30
31 return CODE_LANGUAGE_ALIASES[language] || language
32}
33
34const CODE_LANGUAGE_MAP = {
35 '.py': 'python',

Callers 3

createRendererFunction · 0.90
getCodeLanguageByPathFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected