Skip to content

Commit

Permalink
chore: update doc
Browse files Browse the repository at this point in the history
  • Loading branch information
valerio-pizzichini committed Jan 5, 2024
1 parent 0d92457 commit c549e88
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ const handler = (req, res, params) => {
router.on('GET', '/:file(^\\S+).png', handler)

router.findRoute('GET', '/:file(^\\S+).png')
// => { handler: Function, store: Object }
// => { handler: Function, store: Object, params: ['file'] }

router.findRoute('GET', '/:file(^\\D+).jpg')
// => null
Expand All @@ -423,10 +423,10 @@ const handler = (req, res, params) => {
router.on('GET', '/:param1', handler)

router.findRoute('GET', '/:param1')
// => { handler: Function, store: Object }
// => { handler: Function, store: Object, params: ['param1'] }

router.findRoute('GET', '/:param2')
// => { handler: Function, store: Object }
// => { handler: Function, store: Object, params: ['param1'] }
```

#### hasRoute (method, path, [constraints])
Expand Down

0 comments on commit c549e88

Please sign in to comment.