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

Function getCodeLanguageByPath

web/src/utils/file_preview.js:103–104  ·  view source on GitHub ↗
(path)

Source from the content-addressed store, hash-verified

101}
102
103export const getCodeLanguageByPath = (path) =>
104 normalizeCodeLanguage(CODE_LANGUAGE_MAP[getPreviewFileExtension(path)] || '')
105
106export const isHtmlPreview = (path) => HTML_EXTENSIONS.has(getPreviewFileExtension(path))

Callers

nothing calls this directly

Calls 2

normalizeCodeLanguageFunction · 0.85
getPreviewFileExtensionFunction · 0.85

Tested by

no test coverage detected