MCPcopy
hub / github.com/monkeytypegame/monkeytype / getLanguageDisplayString

Function getLanguageDisplayString

frontend/src/ts/utils/strings.ts:147–158  ·  view source on GitHub ↗
(
  language: Language,
  noSizeString = false,
)

Source from the content-addressed store, hash-verified

145 * @returns A display string for the language.
146 */
147export function getLanguageDisplayString(
148 language: Language,
149 noSizeString = false,
150): string {
151 let out = "";
152 if (noSizeString) {
153 out = removeLanguageSize(language);
154 } else {
155 out = language;
156 }
157 return replaceUnderscoresWithSpaces(out);
158}
159
160/**
161 * Removes the size indicator from a language string.

Callers 7

formatPbFunction · 0.90
LanguageFunction · 0.90
CustomPolyglotFunction · 0.90
LanguageFunction · 0.90
updateFunction · 0.90
misc.spec.tsFile · 0.90

Calls 2

removeLanguageSizeFunction · 0.85

Tested by

no test coverage detected