Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

koa-tree-router

Package Overview
Dependencies
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

koa-tree-router - npm Package Compare versions

Comparing version 0.4.0 to 0.4.2

13

package.json
{
"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 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc