Socket
Socket
Sign inDemoInstall

koa-router

Package Overview
Dependencies
Maintainers
1
Versions
91
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

koa-router - npm Package Compare versions

Comparing version 5.1.0 to 5.1.1

lib/route.js

4

history.md
# History
## 5.1.1
- Match routes in order they were defined. Fixes #131.
## 5.1.0

@@ -4,0 +8,0 @@

12

lib/router.js

@@ -303,9 +303,9 @@ /**

matched.forEach(function (layer) {
if (layer.methods.length === 0) {
middleware.push(layer.middleware);
} else if (~layer.methods.indexOf(method)) {
route = layer;
for (var i = matched.length - 1; i >= 0; --i) {
if (matched[i].methods.length === 0) {
middleware.push(matched[i].middleware);
} else if (~matched[i].methods.indexOf(method)) {
route = matched[i];
}
});
}

@@ -312,0 +312,0 @@ if (this.matched) {

@@ -13,3 +13,3 @@ {

"author": "Alex Mingoia <talk@alexmingoia.com>",
"version": "5.1.0",
"version": "5.1.1",
"keywords": [

@@ -16,0 +16,0 @@ "koa",

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