<commit_before>import thunk from 'redux-thunk';
import { routerMiddleware } from 'connected-react-router';
import { compose } from 'redux';

/**
 * @param history history for redux routing for react components * 
 * @description
 *  routerMiddleware adds middleware which is listening for location changes and updates router state
 *  thunk is a middleware for async redux functions
 */
export const createMiddlewares = ({ history, middlewares = [] }) => compose(routerMiddleware(history), thunk, ...middlewares);<commit_msg>Support redux-devtools-extension<commit_after>import thunk from 'redux-thunk';
import { routerMiddleware } from 'connected-react-router';
import { compose } from 'redux';

const composeEnhancers = window['__REDUX_DEVTOOLS_EXTENSION_COMPOSE__'] || compose;

/**
 * @param history history for redux routing for react components * 
 * @description
 *  routerMiddleware adds middleware which is listening for location changes and updates router state
 *  thunk is a middleware for async redux functions
 */

export const createMiddlewares = ({ history, middlewares = [] }) => composeEnhancers(routerMiddleware(history), thunk, ...middlewares);
{'fraction_non_alphanumeric': 0.0979381443298969, 'fraction_numerical': 0.0, 'mean_word_length': 5.472222222222222, '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': '3000808', 'n_tokens_mistral': 318, 'n_tokens_neox': 308, 'n_words': 106}