From c549e88117d02482029d2916b9106d0a131822a3 Mon Sep 17 00:00:00 2001 From: Valerio Pizzichini Date: Fri, 5 Jan 2024 11:30:59 +0100 Subject: [PATCH] chore: update doc --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index d077857..4083084 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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])