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

Function detectLanguage

src/resolution/frameworks/express.ts:746–751  ·  view source on GitHub ↗

* Detect language from file extension

(filePath: string)

Source from the content-addressed store, hash-verified

744 * Detect language from file extension
745 */
746function detectLanguage(filePath: string): 'typescript' | 'javascript' {
747 if (filePath.endsWith('.ts') || filePath.endsWith('.tsx')) {
748 return 'typescript';
749 }
750 return 'javascript';
751}

Callers 2

extractFunction · 0.70
postExtractFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected