Skip to content

Commit 90ef8a7

Browse files
authored
doc: be more precise about the behavior of middleware on the router (#82)
fix: #44 test ref : https://github.com/koajs/router/blob/2e69eca36739171ee23dde9f616a133488378a62/test/lib/router.js#L197-L222
1 parent edb24b4 commit 90ef8a7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

API.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ Returns router middleware which dispatches a route matching the request.
182182
<a name="module_koa-router--Router+use"></a>
183183

184184
#### router.use([path], middleware) ⇒ <code>Router</code>
185-
Use given middleware.
185+
Use given middleware, __if and only if__, a route is matched.
186186

187187
Middleware run in the order they are defined by `.use()`. They are invoked
188188
sequentially, requests start at the first middleware and work their way

0 commit comments

Comments
 (0)