<commit_before>"use strict";

window.gatherStatistics = function(root) {
  var elementCount = 0;
  var arrayCount = 0;
  var objectCount = 0;

  function visit(node) {
    elementCount++;
    if(node.simple) return;

    if(node.type == "array") arrayCount++;
    else if(node.type == "object") objectCount++;

    node.tuples.forEach(function(tuple) {
      visit(tuple.value);
    });
  }

  visit(root);

  return {
    elementCount: elementCount,<commit_msg>Embrace let in statistics.js<commit_after>"use strict";

window.gatherStatistics = function(root) {
  let elementCount = 0;
  let arrayCount = 0;
  let objectCount = 0;

  function visit(node) {
    elementCount++;
    if(node.simple) return;

    if(node.type == "array") arrayCount++;
    else if(node.type == "object") objectCount++;

    node.tuples.forEach(function(tuple) {
      visit(tuple.value);
    });
  }

  visit(root);

  return {
    elementCount: elementCount,
{'fraction_non_alphanumeric': 0.14376996805111822, 'fraction_numerical': 0.006389776357827476, 'mean_word_length': 3.4549763033175354, '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': '7422427', 'n_tokens_mistral': 313, 'n_tokens_neox': 298, 'n_words': 64}