Skip to content

Commit

Permalink
updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaWise committed Jul 5, 2023
1 parent 66b17df commit e0f7d4d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,11 @@ You cannot construct this class directly (you have to use the [RouterBuilder](#c

### router.route(*url*, [*outVariables*]) -> *value* or *undefined*

Attempts to match the given url (a string or [URL](https://nodejs.org/api/url.html#class-url) object) with a route. If a matching route is found, it returns the value that was originally associated with the route (when `.add()` was called on the [RouterBuilder](#class-routerbuilder)). If no matching route is found, it returns `undefined`.
Attempts to match the given url (a string or [URL](https://nodejs.org/api/url.html#class-url) object) with a route. If a matching route is found, it returns the value that was originally associated with the route. If no matching route is found, it returns `undefined`.

[Percent-encodings](https://en.wikipedia.org/wiki/URL_encoding) are understood and interpretted correctly.

If you pass an object as the second parameter, the values of any variables within the matching route definition will be assigned to the object that you provide.
If you pass an object as the second parameter, the values of any variables within the matching route will be assigned to the object that you provide.

```js
const router = new RouterBuilder().add('/{first}/{second}', 123).build();
Expand Down

0 comments on commit e0f7d4d

Please sign in to comment.