MCPcopy Index your code
hub / github.com/monkeytypegame/monkeytype / typingSpeed

Method typingSpeed

frontend/src/ts/utils/format.ts:37–47  ·  view source on GitHub ↗
(
    wpm: number | null | undefined,
    formatOptions: FormatOptions = {},
  )

Source from the content-addressed store, hash-verified

35 }
36
37 typingSpeed(
38 wpm: number | null | undefined,
39 formatOptions: FormatOptions = {},
40 ): string {
41 const options = { ...FORMAT_DEFAULT_OPTIONS, ...formatOptions };
42 if (wpm === undefined || wpm === null) return options.fallback ?? "";
43
44 const result = getTypingSpeedUnit(this.config.typingSpeedUnit).fromWpm(wpm);
45
46 return this.number(result, options);
47 }
48
49 percentage(
50 percentage: number | null | undefined,

Callers 15

formatPbFunction · 0.80
PbTableFunction · 0.80
AverageNoticeFunction · 0.80
PbNoticeFunction · 0.80
PaceCaretNoticeFunction · 0.80
MinSpeedFunction · 0.80
MinBurstFunction · 0.80
UserRankFunction · 0.80
getSpeedColumnsFunction · 0.80
formatWpmFunction · 0.80
formatSpeedFunction · 0.80
TrendFunction · 0.80

Calls 2

numberMethod · 0.95
fromWpmMethod · 0.80

Tested by

no test coverage detected