A library JS to format numbers and dates.
// Parse to currency string. Returns 'R$10,00'
parse(10.000).toCurrency();
// Parse to percent string with two decimal places. Returns '10,00%'
parse(10.000).toPercent(2);
// Parse to number string with two decimal places. Returns '10,00'
parse(10.000).toNumber();
// Parse to date object. Returns Wed Dec 10 2014
parse("10/12/2014").toDate();
See the documentation. Any questions, see the Issues.
First install the dependencies, then run npm tests:
$ npm install
$ npm tests
Run grunt tests-client:
$ grunt tests-client
Then open the URL to tests