<commit_before># Mercury Router [![Build Status](https://travis-ci.org/twilson63/mercury-router.svg?branch=master)](https://travis-ci.org/twilson63/mercury-router)

This is a router component for Mercury, a FRP JS framework based on the idea of
tiny modules: https://github.com/Raynos/mercury

## Install

```
npm install mercury-router
```

## API

Mecury Router looks for two state attributes:

* `base`: This attribute defines the base route of the router
* `route`: This attribute defines the current/default route

## Usage

* `router()` - initialise mercury router state in app state
* `router.render(routes:Object)` - route path/view mapping in app render
* `router.anchor(attr:Object, VTree|String)` - navigate via `a` html element
* `router.go(url:String)` - navigate to url directly

See [example](example/) for a minimal working implemenation.

## Credits

Created by [@Raynos](https://github.com/Raynos) in
https://gist.github.com/adbf7951bee3fdfe1a65

Tests by [@nikuda](https://github.com/nikuda)

## LICENSE

see LICENSE<commit_msg>Linked to license file from readme<commit_after># Mercury Router [![Build Status](https://travis-ci.org/twilson63/mercury-router.svg?branch=master)](https://travis-ci.org/twilson63/mercury-router)

This is a router component for Mercury, a FRP JS framework based on the idea of
tiny modules: https://github.com/Raynos/mercury

## Install

```
npm install mercury-router
```

## API

Mecury Router looks for two state attributes:

* `base`: This attribute defines the base route of the router
* `route`: This attribute defines the current/default route

## Usage

* `router()` - initialise mercury router state in app state
* `router.render(routes:Object)` - route path/view mapping in app render
* `router.anchor(attr:Object, VTree|String)` - navigate via `a` html element
* `router.go(url:String)` - navigate to url directly

See [example](example/) for a minimal working implemenation.

## Credits

* Created by [@Raynos](https://github.com/Raynos) in
https://gist.github.com/adbf7951bee3fdfe1a65
* Tests by [@nikuda](https://github.com/nikuda)

## License

See [LICENSE](LICENSE)
{'fraction_non_alphanumeric': 0.1286989196806012, 'fraction_numerical': 0.011272898074213245, 'mean_word_length': 4.966386554621849, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 12, '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': '5117721', 'n_tokens_mistral': 700, 'n_tokens_neox': 671, 'n_words': 204}