@which-route/matcher
v0.1.7
Published
matcher
Downloads
1
Readme
@which-route/matcher
match a url to vue router path
install
yarn add @which-route/matcher
usage
const match = require('@which-route/matcher')
const routes = [{
path: '/a',
children: [{
path: 'b/:id'
}]
}]
const url = '/a/b/1'
const res = match(routes, url)
console.log(res)
- result: '/a/b/:id'