<commit_before>import {Computed} from 'cerebral'

export default Computed({
  todos: 'app.list.todos'
}, state => {
  let counts = Object.keys(state.todos).reduce(function (counts, key) {
    let todo = state.todos[key]

    if (todo.completed) {
      counts.completedCount++
    } else if (!todo.completed) {
      counts.remainingCount++
    }

    return counts
  }, {
    completedCount: 0,
    remainingCount: 0
  })


  if (counts.remainingCount === 0 || counts.remainingCount > 1) {
    counts.remainingCountPlural = 'items left'
  } else {
    counts.remainingCountPlural = 'items left'
  }

  return counts
})<commit_msg>fix: typo fix in items plural<commit_after>import {Computed} from 'cerebral'

export default Computed({
  todos: 'app.list.todos'
}, state => {
  let counts = Object.keys(state.todos).reduce(function (counts, key) {
    let todo = state.todos[key]

    if (todo.completed) {
      counts.completedCount++
    } else if (!todo.completed) {
      counts.remainingCount++
    }

    return counts
  }, {
    completedCount: 0,
    remainingCount: 0
  })


  if (counts.remainingCount === 0 || counts.remainingCount > 1) {
    counts.remainingCountPlural = 'items left'
  } else {
    counts.remainingCountPlural = 'item left'
  }

  return counts
})
{'fraction_non_alphanumeric': 0.1307752545027408, 'fraction_numerical': 0.006264682850430697, 'mean_word_length': 3.1493506493506493, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '7052094', 'n_tokens_mistral': 454, 'n_tokens_neox': 441, 'n_words': 95}