koa-router
Advanced tools
Comparing version 10.0.0 to 10.1.1
@@ -27,5 +27,5 @@ const { pathToRegexp, compile, parse } = require('path-to-regexp'); | ||
for(let i = 0; i < methods.length; i++) { | ||
for (let i = 0; i < methods.length; i++) { | ||
const l = this.methods.push(methods[i].toUpperCase()); | ||
if (this.methods[l-1] === 'GET') this.methods.unshift('HEAD'); | ||
if (this.methods[l - 1] === 'GET') this.methods.unshift('HEAD'); | ||
} | ||
@@ -72,6 +72,6 @@ | ||
for (let len = captures.length, i=0; i<len; i++) { | ||
for (let len = captures.length, i = 0; i < len; i++) { | ||
if (this.paramNames[i]) { | ||
const c = captures[i]; | ||
params[this.paramNames[i].name] = c ? safeDecodeURIComponent(c) : c; | ||
if (c && c.length !== 0) params[this.paramNames[i].name] = c ? safeDecodeURIComponent(c) : c; | ||
} | ||
@@ -130,3 +130,3 @@ } | ||
if (args instanceof Array) { | ||
for (let len = tokens.length, i=0, j=0; i<len; i++) { | ||
for (let len = tokens.length, i = 0, j = 0; i < len; i++) { | ||
if (tokens[i].name) replace[tokens[i].name] = args[j++]; | ||
@@ -133,0 +133,0 @@ } |
{ | ||
"name": "koa-router", | ||
"description": "Router middleware for koa. Provides RESTful resource routing.", | ||
"version": "10.0.0", | ||
"version": "10.1.1", | ||
"author": "Alex Mingoia <talk@alexmingoia.com>", | ||
@@ -6,0 +6,0 @@ "bugs": { |
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
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
35638