MCPcopy
hub / github.com/C4illin/ConvertX / normalizeFiletype

Function normalizeFiletype

src/helpers/normalizeFiletype.ts:1–19  ·  view source on GitHub ↗
(filetype: string)

Source from the content-addressed store, hash-verified

1export const normalizeFiletype = (filetype: string): string => {
2 const lowercaseFiletype = filetype.toLowerCase();
3
4 switch (lowercaseFiletype) {
5 case "jfif":
6 case "jpg":
7 return "jpeg";
8 case "htm":
9 return "html";
10 case "tex":
11 return "latex";
12 case "md":
13 return "markdown";
14 case "unknown":
15 return "m4a";
16 default:
17 return lowercaseFiletype;
18 }
19};
20
21export const normalizeOutputFiletype = (filetype: string): string => {
22 const lowercaseFiletype = filetype.toLowerCase();

Callers 4

convert.tsxFile · 0.90
handleConvertFunction · 0.90
mainConverterFunction · 0.90
getPossibleTargetsFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected