New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

trek-router

Package Overview
Dependencies
Maintainers
1
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

trek-router - npm Package Compare versions

Comparing version

to
0.1.3

16

lib/router.js

@@ -80,2 +80,3 @@ 'use strict';

METHODS.forEach(function (m) {
// Start from '/'
_this.trees[m.toUpperCase()] = new Node('/', null, null, []);

@@ -193,3 +194,3 @@ });

var e = cn.findEdge(search.charCodeAt(0));
if (e) {
if (e !== undefined) {
// Go deeper

@@ -247,5 +248,6 @@ cn = e;

var l = lcp(search, cn.prefix);
var leq = l === pl;
var e = undefined;
if (l === pl) {
if (leq) {
search = search.substring(l);

@@ -256,3 +258,3 @@ }

e = cn.findEdge(search.charCodeAt(0));
if (e) {
if (e !== undefined) {
cn = e;

@@ -262,5 +264,9 @@ continue;

if (!leq) {
return result;
}
// Search PNODE
e = cn.findEdge(58 /*':'*/);
if (e) {
if (e !== undefined) {
cn = e;

@@ -282,3 +288,3 @@ l = search.length;

e = cn.findEdge(42 /*'*'*/);
if (e) {
if (e !== undefined) {
cn = e;

@@ -285,0 +291,0 @@ // Catch-all node

{
"name": "trek-router",
"version": "0.1.2",
"version": "0.1.3",
"description": "A fast HTTP router",

@@ -5,0 +5,0 @@ "repository": "trekjs/router",