parsejs
v0.1.5
Published
A library JS to format numbers and dates.
Downloads
5
Readme
ParseJS
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();
Help and Support
See the documentation. Any questions, see the Issues.
Tests
First install the dependencies, then run npm tests:
$ npm install
$ npm tests
Run tests on browser
Run grunt tests-client:
$ grunt tests-client
Then open the URL to tests