<commit_before>Redux Switch Action
===================

Slightly more concise reducer switching for [Flux Standard Actions](https://github.com/acdlite/flux-standard-action).

```js
const switchAction = createSwitchAction({
  [ADD]: addReducer,
  [SUB]: subReducer,
});

export function reducer(state = 0, action) {
  return switchAction(state, action);
}

function addReducer(state, payload) {
  return state + payload.amount;
}

function subReducer(state, payload) {
  return state + payload.amount;
}
```<commit_msg>fix error in example<commit_after>Redux Switch Action
===================

Slightly more concise reducer switching for [Flux Standard Actions](https://github.com/acdlite/flux-standard-action).

```js
const switchAction = createSwitchAction({
  [ADD]: addReducer,
  [SUB]: subReducer,
});

export function reducer(state = 0, action) {
  return switchAction(state, action);
}

function addReducer(state, payload) {
  return state + payload.amount;
}

function subReducer(state, payload) {
  return state - payload.amount;
}
```
{'fraction_non_alphanumeric': 0.15532118887823587, 'fraction_numerical': 0.0019175455417066154, 'mean_word_length': 5.566037735849057, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '7071212', 'n_tokens_mistral': 334, 'n_tokens_neox': 309, 'n_words': 83}