(
wpm: number | null | undefined,
formatOptions: FormatOptions = {},
)
| 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, |
no test coverage detected