Version: v0.8.1 - Beta.  We welcome contributors & feedback.

Number.toPercent

toPercent($numDecimals = 0) -> string

Description

Convert a float to formatted percentage.

$floatNum = 0.1234

$floatNum.toPercent()
//= '12%'

$floatNum.toPercent(1)
//= '12.3%'

$floatNum.toPercent(3)
//= '12.340%'

See Also