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.2.3 to 0.2.4

18

lib/router.js

@@ -5,2 +5,4 @@ 'use strict';

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }

@@ -14,2 +16,6 @@

var _slowEquals = require('slow-equals');
var _slowEquals2 = _interopRequireDefault(_slowEquals);
const METHODS = ['CONNECT', 'DELETE', 'GET', 'HEAD', 'OPTIONS', 'PATCH', 'POST', 'PUT', 'TRACE'];

@@ -230,3 +236,3 @@

// Search order static > param > match-any
if (search.length === 0 || equalsLower(search, cn.prefix)) {
if (search.length === 0 || _slowEquals2['default'](search, cn.prefix)) {
// Found

@@ -316,12 +322,2 @@ result[0] = cn.handler;

function equalsLower(a, b) {
var l = a.length;
if (l !== b.length) return false;
var i = 0;
for (; i < l && a.charCodeAt(i) !== b.charCodeAt(i); ++i) {
return false;
}
return true;
}
Router.METHODS = METHODS;

@@ -328,0 +324,0 @@

{
"name": "trek-router",
"version": "0.2.3",
"version": "0.2.4",
"description": "A fast HTTP router",

@@ -25,3 +25,3 @@ "repository": "trekjs/router",

"devDependencies": {
"babel": "^5.2.15",
"babel": "^5.2.17",
"benchmark": "^1.0.0",

@@ -46,3 +46,5 @@ "isparta": "^3.x",

},
"dependencies": {}
"dependencies": {
"slow-equals": "0.0.2"
}
}
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