kieran / barista

A URL router / generator for NodeJS
https://kieran.github.io/barista/
MIT License
111 stars 22 forks source link

wrong documentation #25

Closed bazo closed 9 years ago

bazo commented 10 years ago

the docs say the cllback after route matches is params

router.first( '/products/15', 'GET', function( params ){ // dispatch the request or something })

but this is not true, it's actually

router.first( '/products/15', 'GET', function(undefined, params ){ // dispatch the request or something })

i had to look to int the source to.

btw why should i care about undefined in the callback?