code: 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;
  }
docs: Add a space every three characters
  @param val
  @returns {string}
  @private