Numeral.js – count on it!

numeral

Numeral.js is a javascript library made for formating and numbers manipulation. (values, percentages, currencies and time units)

Declaration

Formating

Numbers can be formated in currency, percentage or time unit – milion and decimal points can also be set up.

Number formating proposal

Currency

Bytes

Percentages

Time unit

Unformating

You have a formated chain ? use the function unformat() to reuse your value in its original form.

Manipulation

If you don’t use it really often but want it to be ready to use …

Value

In case the original value is available.

Set

Fix the numerical object value.

Difference

Find the difference between your numerical object and a value.

Default formating

Fix a default formating (use .format() without formating chain).
Default formating is fixed at ‘0.0’.

Clone

Clone any object to infinity !

Languages

Change language the way you want !

Numeral.js is a javascript framework we do recommend : formating, unformating, add/ replace a value, or change language on the fly, this framework is an unreplaceable too for values.

Numeral.js
https://github.com/adamwdraper/Numeral-js