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

Function languageForFile

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

Source from the content-addressed store, hash-verified

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

Callers 1

extractFunction · 0.70

Calls 1

execMethod · 0.65

Tested by

no test coverage detected