# myro

> universal bidirectional microrouter

Latest version **0.6.3-alpha.0** (published 2016-05-27) · BSD-3-Clause license · 0 weekly downloads

## Install

```sh
npm install myro
pnpm add myro
yarn add myro
bun add myro
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.6.3-alpha.0 |
| Published | 2016-05-27 |
| First published | 2015-06-25 |
| Weekly downloads | 0 |
| License | BSD-3-Clause |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 59 |
| Author | Stefan Oestreicher |
| Maintainers | steos |

## Links

- npm: https://www.npmjs.com/package/myro
- Repository: https://github.com/steos/myro
- Homepage: https://github.com/steos/myro#readme
- Issues: https://github.com/steos/myro/issues
- npm.io page: https://npm.io/package/myro

## Dependencies (1)

- [lodash](https://npm.io/package/lodash.md) ^4.6.1

## Recent versions

- 0.6.3-alpha.0 (latest) — 2016-05-27
- 0.6.2 — 2016-03-04
- 0.6.1 — 2016-03-04
- 0.6.0 — 2016-03-03
- 0.5.0 — 2016-03-03
- 0.4.0 — 2016-03-03
- 0.3.0 — 2016-03-03
- 0.2.0 — 2016-03-03
- 0.1.0 — 2015-06-25

## README

# myro

[![Build Status](https://travis-ci.org/steos/myro.svg?branch=master)](https://travis-ci.org/steos/myro)

__myro__ is a universal bidirectional micro-router.

It works with pure data and is only concerned with route matching.
No assumptions are made on how to handle or dispatch a route match.
Implementation of that logic is left to the user.

## Getting Started

### Installation

```
npm install myro --save
```

### Example

```js

import myro from 'myro'

const route = myro({
    '/users': {
        name: 'users',
        routes: {
            '/:name': {
                name: 'user'
            }
        }
    },

    '/about': {
        name: 'about'
    },

    '/': {
        name: 'index'
    },
})

// match routes...
route('/users/foo')) // {name: "users.user", params: {name: "foo"}, route: fn}
route('/about')) //  {name: "about", params: {}, ... }


// retrieve the path
route.users.user({name: 'foo'}) // "/users/foo"
route.about() // "/about"


```

## Documentation

- [Introduction](doc/intro.md)
- Myro Examples (Coming Soon)
- Myro React Examples (Coming Soon)

## License

Copyright © 2016 Stefan Oestreicher and contributors.

Distributed under the terms of the BSD-3-Clause license.

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