in packages-rc/rc-codemirror/src/helper/determine-mime-type.ts [4:26]
export default function determineMimeType(type: string): string | undefined {
switch (type) {
case 'json':
return 'application/json';
case 'js':
return 'application/javascript';
case 'ts':
return 'application/typescript';
case 'html':
return 'text/html';
case 'css':
case 'less':
return 'text/x-less';
case 'md':
case 'markdown':
return 'text/markdown';
case 'yaml':
case 'yml':
return 'text/yaml';
default:
break;
}
}