koa-tree-router
Advanced tools
Comparing version 0.12.0 to 0.12.1
@@ -6,2 +6,3 @@ import * as Koa from "koa"; | ||
onMethodNotAllowed?: Router.Middleware<StateT, CustomT>; | ||
ignoreTrailingSlash?: Boolean; | ||
} | ||
@@ -8,0 +9,0 @@ export interface IRouterParamContext<StateT = any, CustomT = {}> { |
{ | ||
"name": "koa-tree-router", | ||
"version": "0.12.0", | ||
"version": "0.12.1", | ||
"description": "A high performance koa router", | ||
@@ -5,0 +5,0 @@ "main": "router.js", |
@@ -55,3 +55,2 @@ # Koa tree router | ||
Instance a new router. | ||
You can pass a middleware with the option `onMethodNotAllowed`. | ||
```js | ||
@@ -61,3 +60,4 @@ const router = require('koa-tree-router')({ | ||
ctx.body = "not allowed" | ||
} | ||
}, | ||
ignoreTrailingSlash: true | ||
}) | ||
@@ -64,0 +64,0 @@ ``` |
27467
808