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 10.0.0 to 10.1.1

10

lib/layer.js

@@ -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": {

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