Jquery-number-format

Jquey Number Format


Project maintained by EyeCode

Welcome to JQuery Number Format Component.

Easy way to use it:

$.numberFormat(source[, options]);

exemple:

var result = $.numberFormat(5.5555555, {
            prefix: '',
            suffix: ' $',
            digits: 2,
            thousandSeparator: ',',
            rounding: true
        })
// result => 5.56 $

Exemple

Initial Options Result
1 prefix: none
suffix: $
digits: 2
2 prefix: $
suffix: none
digits: 3
3 prefix: $
suffix: $
digits: 1
4.4444 prefix: none
suffix: none
digits: 1
5.55555 prefix: none
suffix: none
digits: 2
6.66666 prefix: none
suffix: none
digits: 2
rounding: false

Authors and Contributors

2014 EyeCode