# nast-router

> Library for managing pages.

Latest version **1.0.9** (published 2021-11-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install nast-router
pnpm add nast-router
yarn add nast-router
bun add nast-router
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.9 |
| Published | 2021-11-18 |
| First published | 2021-07-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 5 |
| Unpacked size | 9.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Alexey |
| Maintainers | alexey-renova |
| Keywords | vue-router, router, pages, breadcrumbs |

## Links

- npm: https://www.npmjs.com/package/nast-router
- Repository: https://github.com/renova-st/nast
- Homepage: https://github.com/renova-st/nast#readme
- Issues: https://github.com/renova-st/nast/issues
- npm.io page: https://npm.io/package/nast-router

## Dependencies (5)

- [nast](https://npm.io/package/nast.md) ^1.0.*
- [lodash](https://npm.io/package/lodash.md) ^4.17.*
- [vue-meta](https://npm.io/package/vue-meta.md) ^2.4.*
- [vue-router](https://npm.io/package/vue-router.md) ^3.5.*
- [vuex-router-sync](https://npm.io/package/vuex-router-sync.md) ^5.0.*

## 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

- 1.0.9 (latest) — 2021-11-18
- 1.0.8 — 2021-11-18
- 1.0.7 — 2021-08-05
- 1.0.6 — 2021-07-07
- 1.0.5 — 2021-07-07
- 1.0.4 — 2021-07-07
- 1.0.3 — 2021-07-07
- 1.0.2 — 2021-07-07
- 1.0.1 — 2021-07-07

## README

# nast-router

## Installation
```
npm i -S nast-router
```

## Prepare
```
import NastRouter from 'nast-router'
import Vuex from 'vuex'
import Vue from 'vue'
import App from './App'

Vue.use(Vuex)
const store = new Vuex.Store({ modules: { router: NastRouter.store(), }, })

const routes = [
  { path: '/', name: 'index', component: () => import('./HelloWorld'), title: 'Главная', },
  { path: '/about', name: 'about', component: () => import('./About'), parent: 'index', title: 'О странице', },
]

const router = new NastRouter(Vue, routes, store)

global.$app = {
  router,
}

new Vue({
  router: $app.router.router(),
  store,
  render: (h) => h(App),
}).$mount('#app')
```

## Basic use
```
export default {
  name: 'About',
  data() {
    return {
      breadcrumbs: [],
    }
  },
  mounted() {
    $app.router.set({ title: 'New about title', }) // set current route
    $app.router.set('index', { route: { name: 'index', query: { test: '123', }, }, title: 'New index title', })
    this.breadcrumbs = $app.router.breadcrumbs()
  },
}
```

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