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

koa-trie-router

Package Overview
Dependencies
Maintainers
10
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

koa-trie-router - npm Package Compare versions

Comparing version 2.1.3 to 2.1.4

6

lib/lang.js

@@ -35,9 +35,3 @@ /**

}
/**
* @param {*} any
* @returns {Boolean}
*/
let {isArray} = Array
exports.isArray = isArray
exports.isFunction = isFunction

@@ -44,0 +38,0 @@ exports.isObject = isObject

8

lib/Router.js

@@ -10,3 +10,2 @@

const {
isArray,
isFunction,

@@ -50,5 +49,7 @@ isObject,

addRoute(method, paths, ...middleware) {
if (isString(paths) || (isArray(paths) && isString(paths[0]))) {
// Is this router[verb](paths, middleware) signature?
if (isString(paths) || isString(paths[0])) {
this[__ADD_ROUTE](method, paths, middleware)
} else {
// Otherwise, signature is router[verb](middleware)
middleware.push(paths)

@@ -133,4 +134,3 @@ this[__ADD_ROUTE](method, undefined, middleware)

paths = isArray(paths) ? paths : [paths]
paths = flatten(paths).filter(Boolean)
paths = flatten([paths]).filter(Boolean)

@@ -137,0 +137,0 @@ assert(paths.length, 'Route must have a path')

{
"name": "koa-trie-router",
"description": "Trie-routing for Koa",
"version": "2.1.3",
"version": "2.1.4",
"author": {

@@ -6,0 +6,0 @@ "name": "Jonathan Ong",

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