<commit_before>const { createStore } = require('redux')

const reducer = function (state = initialState, action) {
  switch (action.type) {
    case 'SET_ERROR': {
      return Object.assign(
        {},
        state,
        {
          error: action.error
        }
      )
    }
    case 'CLEAR_ERROR': {
      return Object.assign(
        {},
        state,
        {
          error: ''
        }
      )
    }
    case 'SET_BUDGET_ITEMS': {
      return Object.assign(
        {},
        state,
        {
          budgetItems: action.budgetItems
        }
      )
    }
    case 'SET_SELECTED_BUDGET_ITEM_ID': {
      return Object.assign(
        {},
        state,
        {
          selectedItem: action.selectedItem
        }
      )
    }
    default: {
      return state
    }
  }
}

const initialState = {
  selectedItem: 1,
  budgetItems: [],
  error: ''
}

const store = createStore(
  reducer,
  initialState,
  window.devToolsExtension && window.devToolsExtension()
)

module.exports = store<commit_msg>Changed redux config slightly.<commit_after>const { compose, createStore } = require('redux')

const reducer = function (state = initialState, action) {
  switch (action.type) {
    case 'SET_ERROR': {
      return Object.assign(
        {},
        state,
        {
          error: action.error
        }
      )
    }
    case 'CLEAR_ERROR': {
      return Object.assign(
        {},
        state,
        {
          error: ''
        }
      )
    }
    case 'SET_BUDGET_ITEMS': {
      return Object.assign(
        {},
        state,
        {
          budgetItems: action.budgetItems
        }
      )
    }
    case 'SET_SELECTED_BUDGET_ITEM_ID': {
      return Object.assign(
        {},
        state,
        {
          selectedItem: action.selectedItem
        }
      )
    }
    default: {
      return state
    }
  }
}

const initialState = {
  selectedItem: 1,
  budgetItems: [],
  error: ''
}

const store = createStore(
  reducer,
  initialState,
  compose(
    typeof window === 'object' && typeof window.devToolsExtension !== 'undefined' ? window.devToolsExtension() : (f) => f
  )
)

module.exports = store
{'fraction_non_alphanumeric': 0.11584800741427248, 'fraction_numerical': 0.0009267840593141798, 'mean_word_length': 1.6588669950738917, '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': '1293668', 'n_tokens_mistral': 666, 'n_tokens_neox': 666, 'n_words': 123}