<commit_before># Getting started

_router5_ is available in all major formats: __ES6__, __CommonJS__, and __UMD__. It can be installed using __npm__ or __yarn__. Alternatively, you can download a specific version
from [github](https://github.com/router5/router5/releases).


## Installation

```sh
# yarn
yarn add router5
# npm
npm install router5
```

## Include _router5_ in your application

__CommonJS__


```javascript
// ES2015+
import createRouter, { RouteNode, errorCodes, transitionPath, loggerPlugin, constants } from 'router5';

import browserPlugin from 'router5/plugins/browser';
import listenersPlugin from 'router5/plugins/listeners';
import persistentParamsPlugin from 'router5/plugins/persistentParams';

// ES5
var router5 = require('router5');

var createRouter = router5.default;
var RouteNode = router5.RouteNode;
var errorCodes = router5.errorCodes;
var constants = router5.constants;
var transitionPath = router5.transitionPath;
var loggerPlugin = router5.loggerPlugin;
var constants = router5.constants;

var browserPlugin = require('router5/plugins/browser');
var listenersPlugin = require('router5/plugins/listeners');
var persistentParamsPlugin = require('router5/plugins/persistentParams');
```

__UMD__

A UMD bundle is available in `/dist/umd`, and it should be used for AMD or globals. The bundle contains all _router5_ dependencies (_route-node_ and _path-parser_), but doesn't contain plugins.

Plugins are packaged separately and available in `/dist/umd`:
- `browserPlugin` UMD module is named `router5BrowserPlugin`
- `listenersPlugin` UMD module is named `router5ListenersPlugin`
- `persistentParamsPlugin` UMD module is named `router5PersistentParamsPlugin`
bundle is named `router5ListenersPlugin`.<commit_msg>docs: update getting started<commit_after># Getting started

_router5_ is available in all major formats: __ES6__, __CommonJS__, and __UMD__. It can be installed using __npm__ or __yarn__. Alternatively, you can download a specific version
from [github](https://github.com/router5/router5/releases).


## Installation

```
# yarn
yarn add router5
# npm
npm install router5
```

## Include router5 in your application

### ES2015 syntax

```js
// ES2015+
import createRouter from 'router5';

import browserPlugin from 'router5/plugins/browser';
import persistentParamsPlugin from 'router5/plugins/persistentParams';
```

### CommonJS syntax

```js
var createRouter = require('router5').default;
var browserPlugin = require('router5/plugins/browser');
var persistentParamsPlugin = require('router5/plugins/persistentParams');
```

### UMD

Various UMD bundles are accessible under `/dist/umd`: you should use them for AMD or global. The router5 bundle contains all _router5_ dependencies (_route-node_ and _path-parser_), but doesn't contain plugins.
{'fraction_non_alphanumeric': 0.09477825464949928, 'fraction_numerical': 0.020028612303290415, 'mean_word_length': 5.906172839506173, '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': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1867489', 'n_tokens_mistral': 813, 'n_tokens_neox': 774, 'n_words': 269}