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

find-my-way

Package Overview
Dependencies
Maintainers
1
Versions
112
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

find-my-way - npm Package Compare versions

Comparing version 0.2.2 to 0.2.3

11

index.js

@@ -40,3 +40,3 @@ 'use strict'

// parametric route
if (path[i] === ':') {
if (path.charCodeAt(i) === 58 /* : */) {
j = i + 1

@@ -46,3 +46,3 @@ this._insert(method, path.slice(0, i), 0, null, null, null)

// isolate the parameter name
while (i < len && path[i] !== '/') i++
while (i < len && path.charCodeAt(i) !== 47 /* / */) i++
params.push(path.slice(j, i))

@@ -61,3 +61,3 @@

// wildcard route
} else if (path[i] === '*') {
} else if (path.charCodeAt(i) === 42 /* * */) {
this._insert(method, path.slice(0, i), 0, null, null, null)

@@ -139,4 +139,3 @@ params.push('*')

var i = 0
var len = req.url.length
while (i < len && req.url[i] !== '?' && req.url[i] !== '#') i++
while (i < req.url.length && req.url.charCodeAt(i) !== 63 /* ? */ && req.url.charCodeAt(i) !== 35 /* # */) i++
var handle = this.find(req.method, req.url.slice(0, i))

@@ -201,3 +200,3 @@ if (!handle) return this._defaultRoute(req, res)

i = 0
while (i < pathLen && path[i] !== '/') i++
while (i < pathLen && path.charCodeAt(i) !== 47 /* / */) i++
try {

@@ -204,0 +203,0 @@ params[pindex++] = decodeURIComponent(path.slice(0, i))

{
"name": "find-my-way",
"version": "0.2.2",
"version": "0.2.3",
"description": "Crazy fast http radix based router",

@@ -5,0 +5,0 @@ "main": "index.js",

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