<commit_before>(function() {
  "use strict";
  
  // Config options
  App.vue.config.contentFormatters = {
    'empty': '--',
    'currency': '0,0[.]00',
    'percent': '0,0[.]00',
    'number': '0,0[.]00',
    'date': 'MM/DD/YYYY',
  };
  
  App.vue.interfaces.contentFormatters = {
    methods: {
      _formatToCurrency: function(value, custom_number_format, nullReturn) {
        if (value === undefined || value === null || isNaN(value)) {
         return nullReturn || App.vue.config.contentFormatters.empty; 
        }
        return numeral(value).format('$' + (custom_number_format || App.vue.config.contentFormatters.currency));
      },
      _formatToPercent: function(value, custom_number_format, nullReturn) {
        if (value === undefined || value === null || isNaN(value)) {
         return nullReturn || App.vue.config.contentFormatters.empty; 
        }
        return numeral(value / 100).format((custom_number_format || App.vue.config.contentFormatters.percent) + '%');
      },
      _formatToNumber: function(value, custom_number_format, nullReturn) {
        if (value === undefined || value === null || isNaN(value)) {
         return nullReturn || App.vue.config.contentFormatters.empty; 
        }
        return numeral(value).format(custom_number_format || App.vue.config.contentFormatters.number);
      },
      _formatToPhoneNumber: function(value, reg, nullReturn) {
        if (value === undefined || value === null) {
         return nullReturn || App.vue.config.contentFormatters.empty; 
        }
        var r = reg || /(?:(\+?(?:(\d{1,2}))\s?)?(\(?(?:(\d{3}))\)?(\s|-|\.)?)((?:(\d{3}))(\s|-|\.)?)((?:(\d{4}))))/i;
        var match = r.exec(value);
        if (match !== null && match.length === 11) {
          var areaCode = match[2] || 1;
          return '+' + areaCode + ' (' + match[4] + ') ' + match[7] + '-' + match[10];
        }else{
          return nullReturn || App.vue.config.contentFormatters.empty; 
        }
      },
      _formatToDate: function(value, custom_format, nullReturn) {
        if (value === undefined || value === null || !moment(value).isValid()) {
         return nullReturn || App.vue.config.contentFormatters.empty; 
        }
        return moment(value).format(custom_format || App.vue.config.contentFormatters.date);
      }
    }
  };
})();<commit_msg>Update content_formatters.js<commit_after>(function() {
  "use strict";
  
  // Config options
  App.vue.config.contentFormatters = {
    'empty': '--',
    'currency': '0,0[.]00',
    'percent': '0,0[.]00',
    'number': '0,0[.]00',
    'date': 'MM/DD/YYYY',
  };
  
  App.vue.interfaces.contentFormatters = {
    methods: {
      _formatToCurrency: function(value, custom_number_format, nullReturn) {
        if (value === undefined || value === null || isNaN(value)) {
         return nullReturn || App.vue.config.contentFormatters.empty; 
        }
        return this._numeral(value).format('$' + (custom_number_format || App.vue.config.contentFormatters.currency));
      },
      _formatToPercent: function(value, custom_number_format, nullReturn) {
        if (value === undefined || value === null || isNaN(value)) {
         return nullReturn || App.vue.config.contentFormatters.empty; 
        }
        return this._numeral(value / 100).format((custom_number_format || App.vue.config.contentFormatters.percent) + '%');
      },
      _formatToNumber: function(value, custom_number_format, nullReturn) {
        if (value === undefined || value === null || isNaN(value)) {
         return nullReturn || App.vue.config.contentFormatters.empty; 
        }
        return this._numeral(value).format(custom_number_format || App.vue.config.contentFormatters.number);
      },
      _formatToPhoneNumber: function(value, reg, nullReturn) {
        if (value === undefined || value === null) {
         return nullReturn || App.vue.config.contentFormatters.empty; 
        }
        var r = reg || /(?:(\+?(?:(\d{1,2}))\s?)?(\(?(?:(\d{3}))\)?(\s|-|\.)?)((?:(\d{3}))(\s|-|\.)?)((?:(\d{4}))))/i;
        var match = r.exec(value);
        if (match !== null && match.length === 11) {
          var areaCode = match[2] || 1;
          return '+' + areaCode + ' (' + match[4] + ') ' + match[7] + '-' + match[10];
        }else{
          return nullReturn || App.vue.config.contentFormatters.empty; 
        }
      },
      _formatToDate: function(value, custom_format, nullReturn) {
        if (value === undefined || value === null || !this._moment(value).isValid()) {
         return nullReturn || App.vue.config.contentFormatters.empty; 
        }
        return this._moment(value).format(custom_format || App.vue.config.contentFormatters.date);
      }
    }
  };
})();
{'fraction_non_alphanumeric': 0.18772563176895307, 'fraction_numerical': 0.011892121469526439, 'mean_word_length': 2.7262658227848102, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6080598', 'n_tokens_mistral': 1487, 'n_tokens_neox': 1450, 'n_words': 241}