MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / detectLanguage

Function detectLanguage

src/resolution/frameworks/express.ts:760–765  ·  view source on GitHub ↗

* Detect language from file extension

(filePath: string)

Source from the content-addressed store, hash-verified

758 * Detect language from file extension
759 */
760function detectLanguage(filePath: string): 'typescript' | 'javascript' {
761 if (filePath.endsWith('.ts') || filePath.endsWith('.tsx')) {
762 return 'typescript';
763 }
764 return 'javascript';
765}

Callers 2

extractFunction · 0.70
postExtractFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected