Version: v0.6.1 - Beta.  We welcome contributors & feedback.  THanks!

Number.format

format($numDecimals = 0, $thousandsSep = ',', $decPoint = '.')

Description

Format with the specificed thousands separator and decimal point character.

$num = 1234.56;

$num.format();
//= '1,234'

$num.format(1);
//= '1,234.6'

$num.format(2, '');
//= '1234.56'

$num.format(2, ' ', ',');
//= '1 234,56'