(
value: number | null | undefined,
formatOptions: FormatOptions,
)
| 79 | } |
| 80 | |
| 81 | private number( |
| 82 | value: number | null | undefined, |
| 83 | formatOptions: FormatOptions, |
| 84 | ): string { |
| 85 | if (value === undefined || value === null) { |
| 86 | return formatOptions.fallback ?? ""; |
| 87 | } |
| 88 | const suffix = formatOptions.suffix ?? ""; |
| 89 | |
| 90 | if ( |
| 91 | formatOptions.showDecimalPlaces ?? |
| 92 | this.config.alwaysShowDecimalPlaces |
| 93 | ) { |
| 94 | return Numbers.roundTo2(value).toFixed(2) + suffix; |
| 95 | } |
| 96 | return (formatOptions.rounding ?? Math.round)(value).toString() + suffix; |
| 97 | } |
| 98 | |
| 99 | rank( |
| 100 | position: number | null | undefined, |
no test coverage detected