<commit_before>router.js
=========

router.js - a tiny hash (#) router with redirects included

## Usage
Include `routes.js` in your code. A global `Router` object will be visible. Add routes:
```js
Router.routes(
    /^#\/$/, function() {alert('home');},
    /^#\/routes\/?$/, function() {alert('routes');}
);
```

You may also add redirects:
```js
Router.redirects(
    /^.*$/, "#/"
)
```<commit_msg>Added more details<commit_after>router.js
=========

router.js - a tiny hash (#) router with redirects included

## Usage
Include `routes.js` in your code. A global `Router` object will be visible. Add routes:
```js
Router.routes(
    /^#\/$/, function() {alert('home');},
    /^#\/routes\/?$/, function() {alert('routes');}
    /^#\/routes\/(\d+)\/?$/, function(id) {alert('route ' + id);},
    /^#\/message\/([a-zA-Z]+)\/?$/, function(msg) {alert(msg+'!');}
);
```

You may also add redirects:
```js
Router.redirects(
    /^#\/tracks\/?$/, "#/routes",    // Redirect #/tracks(/) to #/routes
    /^.*$/, "#/"    // Everything not yet matched redirects to #/
)
```
{'fraction_non_alphanumeric': 0.26454033771106944, 'fraction_numerical': 0.0, 'mean_word_length': 3.285140562248996, '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': '1605807', 'n_tokens_mistral': 390, 'n_tokens_neox': 383, 'n_words': 97}