Exteremly customizable paths without a headache
[!WARNING] argon-router is not production ready yet and still may have bugs and unstable API. If you found bug — please report it on GitHub.
For additional information, guides and api reference visit documentation site
npm i @argon-router/paths
- String parameter
'/:id'; // same as '/something'
- String parameters array
'/:id+'; // same as '/something', '/something/went' and etc
- String parameters array with possible zero length
'/:id*'; // same as '/', '/something', '/something/went' and etc
- Nullable parameter
'/:id?'; // same as '/' and '/test'
- Generic parameter (numbers)
'/:id<number>'; // same as '/123' and not '/test'
- Nullable generic parameter (numbers)
'/:id<number>?'; // same as '/123', '/' and not '/test'
- Generic parameter (string literals)
'/:id<hello|world>'; // same as '/hello', '/world' and not '/test'
- Ranges for parameter
'/:id{2,3}'; // same as '/test/test', '/test/test/test' and not '/test'