src/formatter.js
function (number, model) {
    if (_.isNull(number) || _.isUndefined(number)) return '';

    number = parseFloat(number).toFixed(~~this.decimals);

    var parts = number.split('.');
    var integerPart = parts[0];
    var decimalPart = parts[1] ? (this.decimalSeparator || '.') + parts[1] : '';

    return integerPart.replace(this.HUMANIZED_NUM_RE, '$1' + this.orderSeparator) + decimalPart;
  }
function (number, model) {
    if (_.isNull(number) || _.isUndefined(number)) return '';

    number = parseFloat(number).toFixed(~~this.decimals);

    var parts = number.split('.');
    var integerPart = parts[0];
    var decimalPart = parts[1] ? (this.decimalSeparator || '.') + parts[1] : '';

    return integerPart.replace(this.HUMANIZED_NUM_RE, '$1' + this.orderSeparator) + decimalPart;
  }
function ( number , model ) { if ( _ . isNull ( number ) || _ . isUndefined ( number ) ) return '' ; number = parseFloat ( number ) . toFixed ( ~ ~ this . decimals ) ; var parts = number . split ( '.' ) ; var integerPart = parts [ 0 ] ; var decimalPart = parts [ 1 ] ? ( this . decimalSeparator || '.' ) + parts [ 1 ] : '' ; return integerPart . replace ( this . HUMANIZED_NUM_RE , '$1' + this . orderSeparator ) + decimalPart ; }
Takes a floating point number and convert it to a formatted string where
every thousand is separated by `orderSeparator`, with a `decimal` number of
decimals separated by `decimalSeparator`. The number returned is rounded
the usual way.

@member Backgrid.NumberFormatter
@param {number} number
@param {Backbone.Model} model Used for more complicated formatting
@return {string}
Takes a floating point number and convert it to a formatted string where every thousand is separated by orderSeparator with a decimal number of decimals separated by decimalSeparator . The number returned is rounded the usual way .