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

Function detectLanguage

src/resolution/frameworks/express.ts:997–1002  ·  view source on GitHub ↗

* Detect language from file extension

(filePath: string)

Source from the content-addressed store, hash-verified

995 * Detect language from file extension
996 */
997function detectLanguage(filePath: string): 'typescript' | 'javascript' {
998 if (filePath.endsWith('.ts') || filePath.endsWith('.tsx')) {
999 return 'typescript';
1000 }
1001 return 'javascript';
1002}

Callers 2

extractFunction · 0.70
postExtractFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected