<commit_before>Relax API
=========

## Dispatcher API

Dispatcher is used to broadcast actions to registered Stores. Check out [Relax.js](https://github.com/gyzerok/relax.js/blob/master/src/Relax.js) for source code.

### Dispatcher.handleViewAction(action: Object)
Dispatchers action as a view action (```payload.source == VIEW_ACTION```).

### Dispatcher.handleServerAction(action: Object)
Dispatchers action as a view action (```payload.source == SERVER_ACTION```).

### Dispatcher.subscribe(Store: Store, actions: Object)
Registers Store for a given set of actions.

## Store API

Stores are your model layer. You can register Stores to handle any of actions and the notify your views about ones changes. Check out [Relax.js](https://github.com/gyzerok/relax.js/blob/master/src/Relax.js) for source code.

### Store.emitChange()
Emits Store change event.

### Store.onChange(callback: Function)
Registers ```callback``` for the Store change event.

### Store.offChange(callback: Function)
Unregisters ```callback``` for the Store change event.<commit_msg>Update API.md<commit_after>Relax API
=========

## Actions (ActionCreators)

Describe actions here

## Dispatcher API

Dispatcher is used to broadcast actions to registered Stores. Check out [Relax.js](https://github.com/gyzerok/relax.js/blob/master/src/Relax.js) for source code.

### Dispatcher.handleViewAction(action: Object)
Dispatchers action as a view action (```payload.source == VIEW_ACTION```).

### Dispatcher.handleServerAction(action: Object)
Dispatchers action as a view action (```payload.source == SERVER_ACTION```).

### Dispatcher.subscribe(Store: Store, actions: Object)
Registers Store for a given set of actions. Actions object 

## Store API

Stores are your model layer. You can register Stores to handle any of actions and the notify your views about ones changes. Check out [Relax.js](https://github.com/gyzerok/relax.js/blob/master/src/Relax.js) for source code.

### Store.onChange(callback: Function)
Registers ```callback``` for the Store change event.
```javascript
function storeDidChange() {
    // Ask FooStore for it's current state and do something with it
}
FooStore.onChange(storeDidChange);
```

### Store.offChange(callback: Function)
Unregisters ```callback``` for the Store change event.
```javascript
function storeDidChange() {
    // Ask FooStore for it's current state and do something with it
}
FooStore.offChange(storeDidChange);
```

### Store.emitChange()
Emits Store change event. All registered callbacks would be invoked after this call.
{'fraction_non_alphanumeric': 0.12401883830455258, 'fraction_numerical': 0.0, 'mean_word_length': 5.217073170731707, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, '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': '166465', 'n_tokens_mistral': 751, 'n_tokens_neox': 712, 'n_words': 254}