@argon-router/paths
TypeScript icon, indicating that this package has built-in type declarations

0.7.0 • Public • Published

☄️ argon-router/paths

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.

Documentation

For additional information, guides and api reference visit documentation site

Packages

Installation

npm i @argon-router/paths

Supported types

  • 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'

Package Sidebar

Install

npm i @argon-router/paths

Weekly Downloads

36

Version

0.7.0

License

MIT

Unpacked Size

18 kB

Total Files

6

Last publish

Collaborators

  • enci