(percent: Percent | undefined, locale: SupportedLocale = DEFAULT_LOCALE)
| 534 | } |
| 535 | |
| 536 | function formatPercent(percent: Percent | undefined, locale: SupportedLocale = DEFAULT_LOCALE) { |
| 537 | if (!percent) return '-' |
| 538 | |
| 539 | return `${Number(percent.toFixed(3)).toLocaleString(locale, { |
| 540 | maximumFractionDigits: 3, |
| 541 | useGrouping: false, |
| 542 | })}%` |
| 543 | } |
| 544 | |
| 545 | // Used to format floats representing percent change with fixed decimal places |
| 546 | function formatDelta(delta: Nullish<number>, locale: SupportedLocale = DEFAULT_LOCALE) { |
no outgoing calls
no test coverage detected
searching dependent graphs…