(path: string)
| 15 | } |
| 16 | |
| 17 | export function getLanguageFromPath(path: string): string { |
| 18 | const fileExtension = getFileExt(path); |
| 19 | |
| 20 | if (fileExtension === 'js') { |
| 21 | return 'javascript'; |
| 22 | } else if (fileExtension === 'ts') { |
| 23 | return 'typescript'; |
| 24 | } else { |
| 25 | return fileExtension; |
| 26 | } |
| 27 | } |
no test coverage detected