<commit_before>//Collections

_.each = function(list, iteratee) {
  if(Array.isArray(list)) {
    for (var i = 0; i < list.length; i++) {
      iteratee(list[i],i,list);
    }
  } else if (typeof list === 'object') {
    for (var key in list) {
      iteratee(list[key],key,list);
    }
  }
}



<commit_msg>added _.map<commit_after>//Collections

_.each = function(list, iteratee) {
  if(Array.isArray(list)) {
    for (var i = 0; i < list.length; i++) {
      iteratee(list[i],i,list);
    }
  } else if (typeof list === 'object') {
    for (var key in list) {
      iteratee(list[key],key,list);
    }
  }
}

_.map = function(list, iteratee) {
  var results = [];
  if(Array.isArray(list)) {
    for(var i = 0; i < list.length; i++) {
      results.push(iteratee(list[i],i,list));
    }
  } else if (typeof list === 'object') {
    for(var key in list) {
      results.push(iteratee(list[key],key,list));
    }
  }
  return results;
}


{'fraction_non_alphanumeric': 0.18956336528221512, 'fraction_numerical': 0.003194888178913738, 'mean_word_length': 2.7903225806451615, 'pattern_counts': {'":': 0, '<': 6, '<?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': '295079', 'n_tokens_mistral': 366, 'n_tokens_neox': 353, 'n_words': 74}