index.js
function __addSpacesSeparator(val) {
    var reg = /(\d+)(\d{3})/,
        sep = ' ';
    // val must be a type String
    val += '';

    while (reg.test(val)) {
        val = val.replace(reg, '$1' + sep + '$2');
    }
    return val;
}
function __addSpacesSeparator(val) {
    var reg = /(\d+)(\d{3})/,
        sep = ' ';
    // val must be a type String
    val += '';

    while (reg.test(val)) {
        val = val.replace(reg, '$1' + sep + '$2');
    }
    return val;
}
function __addSpacesSeparator ( val ) { var reg = / (\d+)(\d{3}) / , sep = ' ' ; // val must be a type String val += '' ; while ( reg . test ( val ) ) { val = val . replace ( reg , '$1' + sep + '$2' ) ; } return val ; }
Add a space every three characters
@param val
@returns {string}
@private
Add a space every three characters