# router5-transition-path

> Router5 transition path helper function

Latest version **8.0.1** (published 2020-03-19) · MIT license · 0 weekly downloads

## Install

```sh
npm install router5-transition-path
pnpm add router5-transition-path
yarn add router5-transition-path
bun add router5-transition-path
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 8.0.1 |
| Published | 2020-03-19 |
| First published | 2017-06-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 13.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1697 |
| Author | Thomas Roch |
| Maintainers | troch |
| Keywords | router5, transition |

## Links

- npm: https://www.npmjs.com/package/router5-transition-path
- Repository: https://github.com/router5/router5
- Homepage: https://github.com/router5/router5/tree/master/packages/router5-transition-path
- Issues: https://github.com/router5/router5/issues
- npm.io page: https://npm.io/package/router5-transition-path

## Alternatives

- [express-promise-router](https://npm.io/package/express-promise-router.md) — 736.1K weekly downloads
- [next-usequerystate](https://npm.io/package/next-usequerystate.md) — 29.8K weekly downloads
- [@bitkyc08/opencodex](https://npm.io/package/@bitkyc08/opencodex.md) — 4.6K weekly downloads
- [lynkr](https://npm.io/package/lynkr.md) — 575 weekly downloads
- [baremetal.js](https://npm.io/package/baremetal.js.md) — 42 weekly downloads

## Recent versions

- 8.0.1 (latest) — 2020-03-19
- 8.0.0 — 2020-03-01
- 7.0.1 — 2019-02-21
- 7.0.0 — 2018-12-18
- 5.4.0 — 2018-09-11
- 5.3.1 — 2018-08-19
- 5.3.0 — 2018-04-20
- 5.2.0 — 2018-04-19
- 5.1.1 — 2018-01-09
- 5.1.0 — 2017-11-17
- 5.0.1 — 2017-11-15
- 5.0.0 — 2017-06-25
- 4.0.1 — 2017-06-14

## README

# transition-path

Router5 helper to determine a transition path.

### Installation

```
npm install --save router5-transition-path
```

### Usage

This module exports a `transitionPath` function which can compute the transition path between two router5 states: segments to deactivate, segments to activate and intersection node between the two.

It also exports (as named exports) a `nameToIDs` function for transforming a route name to a list of segments.

```javascript
import transitionPath from 'router5-transition-path';

const { toActivate, toDeactivate, intersection } = transitionPath(toState, fromState);
```

__ES5__

```javascript
var transitionPath = require('router5-transition-path').default;
```

See the tests for examples.

---
_Source: https://npm.io/package/router5-transition-path · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
