(file_path: string)
| 47 | * on this, they fire-and-forget or the consumer already handles Promise<string>. |
| 48 | */ |
| 49 | export async function getLanguageName(file_path: string): Promise<string> { |
| 50 | await getCliHighlightPromise() |
| 51 | const ext = extname(file_path).slice(1) |
| 52 | if (!ext) return 'unknown' |
| 53 | return loadedGetLanguage?.(ext)?.name ?? 'unknown' |
| 54 | } |
| 55 |
no test coverage detected