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

Function languageForFile

src/resolution/frameworks/expo-router.ts:105–117  ·  view source on GitHub ↗
(filePath: string)

Source from the content-addressed store, hash-verified

103const API_METHODS = 'GET|POST|PUT|PATCH|DELETE|HEAD|OPTIONS';
104
105function languageForFile(filePath: string): Language {
106 const ext = ROUTE_EXT.exec(filePath)?.[1];
107 switch (ext) {
108 case 'tsx':
109 return 'tsx';
110 case 'jsx':
111 return 'jsx';
112 case 'ts':
113 return 'typescript';
114 default:
115 return 'javascript';
116 }
117}
118
119const IDENT = '[A-Za-z_$][\\w$]*';
120

Callers 1

extractFunction · 0.70

Calls 1

execMethod · 0.65

Tested by

no test coverage detected