Format decimal numbers.
NPM:
npm install --save @nib/format-decimal
Component:
component install nib-health-funds/format-decimal
var decimal = require('format-decimal');
var price = decimal.format(1699, {places: 2, separator: ','});
console.log(price); //prints "1,699.00"
Rounds the number to the specified number of places.
Formats the number.
- places - The number of places to round
- separator - The number separator