MCPcopy Index your code
hub / github.com/reactide/reactide / _getLanguage

Method _getLanguage

renderer/components/TextEditor.js:126–147  ·  view source on GitHub ↗
(path)

Source from the content-addressed store, hash-verified

124
125 // Return language type as a string
126 _getLanguage(path) {
127 if (path.includes('.')) {
128 switch (path.split('.').pop()) {
129 case 'js':
130 return 'javascript';
131 case 'jsx':
132 return 'javascript';
133 case 'ts':
134 return 'typescript';
135 case 'json':
136 return 'json';
137 case 'css':
138 return 'css';
139 case 'html':
140 return 'html';
141 case 'md':
142 return 'markdown';
143 default:
144 return undefined;
145 }
146 }
147 };
148
149
150

Callers 2

_initializeFileMethod · 0.95
componentDidMountMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected