Format a percentage representation of a number.
The number is multiplied by 100 to create a percentage.
formatPercent(0.85) // 85%formatPercent(0.1234) // 12%formatPercent(0.8567, 2) // 85.67%
Formatted percentage (as string)
Number to format
Optional
(optional) Number of decimal places to round to (defaults to 0)
Generated using TypeDoc
Format a percentage representation of a number.
The number is multiplied by 100 to create a percentage.
Example
Returns
Formatted percentage (as string)