diabetic-utils / formatPercentage
formatPercentage(
val
,digits
):string
Defined in: formatters.ts:32
Formats a value as a clinical percentage string (e.g., ‘85.0%’). Used for reporting TIR, CV, and other clinical metrics.
number
Value to format (fraction or percent)
number
= 1
Number of decimal places (default: 1)
string
Formatted percentage string (e.g., ‘85.0%’)