<commit_before>module.exports = function (list) {
  list[0].first = true;
  list[list.length -1].last = true;
  return list;
}<commit_msg>Added penultimate and index info to lists<commit_after>module.exports = function (list) {
    
  if (list.length) {
    list[list.length-1].last = true;
    list[0].first = true;
  }

  if (list.length > 2) {
    list[list.length-2].penultimate = true;
  }

  // Should I do a zero-based index or not?
  // Decide before documenting this. Beware
  // if you use this in your theme before then.
  list = list.map(function(el, i){
    el.index = i + 1;
    return el;
  });

  return list;
};
{'fraction_non_alphanumeric': 0.14012738853503184, 'fraction_numerical': 0.011146496815286623, 'mean_word_length': 2.8353658536585367, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, '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': '3589426', 'n_tokens_mistral': 225, 'n_tokens_neox': 218, 'n_words': 62}