Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
fundon committed Apr 6, 2016
1 parent b5bbe9a commit 9cfefb2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,12 @@ let result = router.find('GET', '/users/233')
// => [handler, params]
// => [()=>{}, [{name: id, value: 233}]]

let params
if (result[0]) {
result[1].forEach(param => params[param.name] = param.value)
// => { id: 233 }
}

// Not Found
let result = router.find('GET', '/photos/233')
// => [handler, params]
Expand Down

0 comments on commit 9cfefb2

Please sign in to comment.