1.0.2 • Published 3 years ago

@jswork/next-path-match v1.0.2

Weekly downloads
1
License
MIT
Repository
-
Last release
3 years ago

next-path-match

A wrapper for path-to-regexp.

version license size download

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

namedefaultdescription
replacements['?', '\?']Replace for pre process route.
completionbothWill completion route(both/left/right/none).

resources

license

Code released under the MIT license.