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 0.0.3 to 0.0.4

19

lib/router.js

@@ -17,5 +17,5 @@ "use strict";

var SNODE = 0;
var PNODE = 1;
var ANODE = 2;
var SNODE = 0; // static route
var PNODE = 1; // param route
var ANODE = 2; // all star route

@@ -93,3 +93,3 @@ var Node = (function () {

value: function insert(method, path, handler, has) {
var cn = this.trees[method];
var cn = this.trees[method]; // Current node as root
var search = path;

@@ -135,11 +135,8 @@

var e = cn.findEdge(search[0]);
if (!e) {
var n = new Node(search, has, null, null);
if (handler) {
n.handler = handler;
}
if (e) {
cn = e;
} else {
var n = new Node(search, has, handler, null, null);
cn.edges.push(n);
break;
} else {
cn = e;
}

@@ -146,0 +143,0 @@ } else {

{
"name": "trek-router",
"version": "0.0.3",
"version": "0.0.4",
"description": "A fast HTTP router router",

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

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