<commit_before>import Immutable from 'immutable';
import {createLogger} from 'redux-logger';
import {createStore, applyMiddleware} from 'redux';
import createSagaMiddleware from 'redux-saga';
import reducers from './reducers';
import config from './config';
import rootSaga from './sagas';

let createStoreWithMiddleware = createStore;

if (config.logReduxActions()) {
  const logger = createLogger();
  createStoreWithMiddleware =
    applyMiddleware(logger)(createStoreWithMiddleware);
}

const sagaMiddleware = createSagaMiddleware();
createStoreWithMiddleware =
  applyMiddleware(sagaMiddleware)(createStoreWithMiddleware);

function createApplicationStore() {
  const store = createStoreWithMiddleware(reducers, new Immutable.Map());
  sagaMiddleware.run(rootSaga);
  return store;
}

export default createApplicationStore;<commit_msg>Support for Redux devtools<commit_after>import Immutable from 'immutable';
import {createLogger} from 'redux-logger';
import {createStore, applyMiddleware} from 'redux';
import createSagaMiddleware from 'redux-saga';
import reducers from './reducers';
import config from './config';
import rootSaga from './sagas';

let createStoreWithMiddleware = createStore;

if (config.logReduxActions()) {
  const logger = createLogger();
  createStoreWithMiddleware =
    applyMiddleware(logger)(createStoreWithMiddleware);
}

const sagaMiddleware = createSagaMiddleware();
createStoreWithMiddleware =
  applyMiddleware(sagaMiddleware)(createStoreWithMiddleware);

let devToolsExtension;

if (window.__REDUX_DEVTOOLS_EXTENSION__) {
  devToolsExtension = window.__REDUX_DEVTOOLS_EXTENSION__();
}

function createApplicationStore() {
  const store = createStoreWithMiddleware(
    reducers,
    new Immutable.Map(),
    devToolsExtension,
  );
  sagaMiddleware.run(rootSaga);
  return store;
}

export default createApplicationStore;
{'fraction_non_alphanumeric': 0.09731182795698924, 'fraction_numerical': 0.0, 'mean_word_length': 7.021551724137931, 'pattern_counts': {'":': 0, '<': 3, '<?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': '3077081', 'n_tokens_mistral': 517, 'n_tokens_neox': 536, 'n_words': 124}