@feizheng/next-path-match
v1.0.2
Published
A wrapper for path-to-regexp.
Downloads
11
Readme
next-path-match
A wrapper for path-to-regexp.
installation
npm install -S @feizheng/next-path-matchusage
import '@feizheng/next-path-match';
const res = nx.pathMatch(
'/dashboard/self-analysis/:type/:id',
'/dashboard/self-analysis/folder/13'
);
// result:
{
type:'folder',
id:'13'
}resources
- https://github.com/pillarjs/path-to-regexp
