(x: number)
| 159 | * @return Succinct string representing `x`. |
| 160 | */ |
| 161 | export function getSuccinctNumberDisplay(x: number): string { |
| 162 | const decimalPlaces = getDisplayDecimalPlaces(x); |
| 163 | return decimalPlaces > MAX_NUM_DECIMAL_PLACES ? |
| 164 | x.toExponential(BASE_NUM_DIGITS) : |
| 165 | x.toFixed(decimalPlaces); |
| 166 | } |
| 167 | |
| 168 | /** |
| 169 | * Determine the number of decimal places to display. |
no test coverage detected
searching dependent graphs…