(code: string)
| 166 | } |
| 167 | |
| 168 | export const codeLanguageToMimeType = (code: string) => { |
| 169 | const parsed = code.toLowerCase() |
| 170 | if (parsed === 'plaintext') return 'text/plain' |
| 171 | return `text/${parsed}` |
| 172 | } |
| 173 | |
| 174 | export const mimeTypeToCodeLanguage = (mimeType: string) => { |
| 175 | if (mimeType === 'text/plain') return 'plaintext' |
no outgoing calls
no test coverage detected