
numer.js is a super tiny (1kb minified) JavaScript library for converting, formatting and manipulating numbers.
How to use it:
1. Install the numer.js with NPM.
# Yarn $ yarn add numer.js # NPM $ npm i numer.js --save
2. Import the numer.js library.
<script src="numer.js"></script>
3. Format a number with commas as thousands separators.
new Numer({
style: 'comma'
}).format(1000000);
=> 1,000,0004. Abbreviate large numbers.
new Numer({
style: 'abbreviation'
}).format(123456789);
=> 0.1B5. Format a number as ordinal.
new Numer({
style: 'ordinal'
}).format(2);
=> 2nd






