<commit_before>format = function(object, indent) {
  var res = ''

  if (_(object).isArray()) {

    res += indent + '[\n';
    var array = _(object).map(function(item) {
      return format(item, indent + '  ');
    });
    res += array.join(',\n');
    res += '\n' + indent + ']'

  } else if (_(object).isObject()) {

    res += indent + '{\n'
    var array = _(object).map(function(value, key) {
      return indent + '  ' + key + ': ' + format(value, indent + '  ');
    });
    res += array.join(',\n');
    res += '\n' + indent + '}'

  } else if (_(object).isString()) {

    return '"' + object.replace(/\n/g, '\\n').replace(/\t/g, '\\t') + '"';

  } else {

    return object;

  }
  return res;
}

var onSuccess = function(data) {
  $('.tab-pane code').text(format(data, ''));
  Prism.highlightAll();
}

var handleClick = function(e) {
  e.preventDefault();
  var url =  $(this).attr('href');
  $(this).parents('li').siblings().removeClass('active');
  $(this).parents('li').addClass('active');
  $('#url').attr('href', url).text('http://jsonplaceholder.com' + url);
  $.ajax(url).then(onSuccess);
}

$('.nav-tabs a').on('click', handleClick);
$('.nav-tabs a:first').click();<commit_msg>Update URL<commit_after>format = function(object, indent) {
  var res = ''

  if (_(object).isArray()) {

    res += indent + '[\n';
    var array = _(object).map(function(item) {
      return format(item, indent + '  ');
    });
    res += array.join(',\n');
    res += '\n' + indent + ']'

  } else if (_(object).isObject()) {

    res += indent + '{\n'
    var array = _(object).map(function(value, key) {
      return indent + '  ' + key + ': ' + format(value, indent + '  ');
    });
    res += array.join(',\n');
    res += '\n' + indent + '}'

  } else if (_(object).isString()) {

    return '"' + object.replace(/\n/g, '\\n').replace(/\t/g, '\\t') + '"';

  } else {

    return object;

  }
  return res;
}

var onSuccess = function(data) {
  $('.tab-pane code').text(format(data, ''));
  Prism.highlightAll();
}

var handleClick = function(e) {
  e.preventDefault();
  var url =  $(this).attr('href');
  $(this).parents('li').siblings().removeClass('active');
  $(this).parents('li').addClass('active');
  $('#url').attr('href', url).text('http://jsonplaceholder.herokuapp.com' + url);
  $.ajax(url).then(onSuccess);
}

$('.nav-tabs a').on('click', handleClick);
$('.nav-tabs a:first').click();
{'fraction_non_alphanumeric': 0.25593008739076156, 'fraction_numerical': 0.0, 'mean_word_length': 3.1094017094017095, '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': '6410761', 'n_tokens_mistral': 868, 'n_tokens_neox': 843, 'n_words': 154}