-
-
Notifications
You must be signed in to change notification settings - Fork 201
Open
Description
version: numbro 2.4.0
After transitioning from numeral.js I noticed that a format string of '0' does not round to the nearest integer
> var numbro = require("numbro");
undefined
> num = numbro(23.4333333);
R { _value: 23.4333333 }
> num.format('0')
'23.4333333'
Adding one or more decimal places does round to the specified number of digits
> num.format('0.0')
'23.4'
> num.format('0.00')
'23.43'
Is there an alternate syntax for displaying a number with no decimal places?
Truffula
Metadata
Metadata
Assignees
Labels
No labels