<commit_before>const { createStore, applyMiddleware } = require('redux')
const thunk = require('redux-thunk')
const rootReducer = require('../reducers')

module.exports = (preloadedState) => {
  const middlewares = [thunk]

  if (process.env.NODE_ENV === `development`) {
    const createLogger = require(`redux-logger`)
    const logger = createLogger()
    middlewares.push(logger)
  }

  const store = createStore(
    rootReducer,
    preloadedState,
    applyMiddleware(...middlewares)
  )

  return store
}
<commit_msg>Use redux-logger if not in production mode.<commit_after>const { createStore, applyMiddleware } = require('redux')
const thunk = require('redux-thunk')
const rootReducer = require('../reducers')

module.exports = (preloadedState) => {
  const middlewares = [thunk]

  if (process.env.NODE_ENV !== 'production') {
    const createLogger = require(`redux-logger`)
    const logger = createLogger()
    middlewares.push(logger)
  }

  const store = createStore(
    rootReducer,
    preloadedState,
    applyMiddleware(...middlewares)
  )

  return store
}

{'fraction_non_alphanumeric': 0.12974976830398516, 'fraction_numerical': 0.0, 'mean_word_length': 4.070422535211268, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '348725', 'n_tokens_mistral': 345, 'n_tokens_neox': 339, 'n_words': 72}