1.0.2 • Published 3 years ago
@jswork/next-path-match v1.0.2
next-path-match
A wrapper for path-to-regexp.
installation
npm install -S @jswork/next-path-match
usage
import '@jswork/next-path-match';
const res = nx.pathMatch(
'/dashboard/self-analysis/:type/:id',
'/dashboard/self-analysis/folder/13'
);
// result:
{
type:'folder',
id:'13'
}
options
name | default | description |
---|---|---|
replacements | ['?', '\?'] | Replace for pre process route. |
completion | both | Will completion route(both/left/right/none ). |
resources
license
Code released under the MIT license.