koa-tree-router
Advanced tools
Comparing version 0.4.0 to 0.4.2
{ | ||
"name": "koa-tree-router", | ||
"version": "0.4.0", | ||
"version": "0.4.2", | ||
"description": "A high performance koa router", | ||
@@ -18,3 +18,2 @@ "main": "router.js", | ||
"*.js", | ||
"*.md", | ||
"index.d.ts" | ||
@@ -38,10 +37,10 @@ ], | ||
"devDependencies": { | ||
"expect": "^22.4.3", | ||
"koa": "^2.5.0", | ||
"mocha": "^5.0.5", | ||
"supertest": "^3.0.0" | ||
"expect": "^23.5.0", | ||
"koa": "^2.5.2", | ||
"mocha": "^5.2.0", | ||
"supertest": "^3.1.0" | ||
}, | ||
"dependencies": { | ||
"koa-compose": "^4.0.0" | ||
"koa-compose": "^4.1.0" | ||
} | ||
} |
@@ -9,9 +9,9 @@ # Koa tree router | ||
- Fast. Up to 12 times faster than Koa-router. [Benchmark](https://github.com/delvedor/router-benchmark) | ||
- Fast. Up to 11 times faster than Koa-router. [Benchmark](https://github.com/delvedor/router-benchmark) | ||
- Express routing using `router.get`, `router.put`, `router.post`, etc. | ||
- Express-style routing using `router.get`, `router.put`, `router.post`, etc. | ||
- Support for 405 method not allowed | ||
- Support for `405 method not allowed` | ||
- Multiple middlewares per route | ||
- Multiple middleware per route | ||
@@ -63,3 +63,3 @@ ## How does it work? | ||
#### Shorthand methods | ||
If you want tp get expressive, here is what you can do: | ||
If you want to get expressive, here is what you can do: | ||
```js | ||
@@ -66,0 +66,0 @@ router.get(path, middleware) |
@@ -0,14 +1,6 @@ | ||
const http = require("http"); | ||
const compose = require("koa-compose"); | ||
const Node = require("./tree"); | ||
const httpMethods = [ | ||
"DELETE", | ||
"GET", | ||
"HEAD", | ||
"PATCH", | ||
"POST", | ||
"PUT", | ||
"OPTIONS", | ||
"TRACE", | ||
"CONNECT" | ||
]; | ||
const httpMethods = http.METHODS; | ||
const NOT_FOUND = { handle: null, params: [] }; | ||
@@ -15,0 +7,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
21422
577
1
Updatedkoa-compose@^4.1.0