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 1.2.0 to 1.2.1

23

index.js

@@ -20,2 +20,3 @@ 'use strict'

const httpMethods = ['DELETE', 'GET', 'HEAD', 'PATCH', 'POST', 'PUT', 'OPTIONS', 'TRACE', 'CONNECT']
var errored = false

@@ -151,2 +152,3 @@ function Router (opts) {

var node = null
var decoded = null
var pindex = 0

@@ -204,7 +206,7 @@ var params = []

while (i < pathLen && path.charCodeAt(i) !== 47) i++
try {
params[pindex++] = decodeURIComponent(path.slice(0, i))
} catch (e) {
decoded = fastDecode(path.slice(0, i))
if (errored) {
return null
}
params[pindex++] = decoded
path = path.slice(i)

@@ -217,7 +219,7 @@ continue

if (node) {
try {
params[pindex] = decodeURIComponent(path)
} catch (e) {
decoded = fastDecode(path)
if (errored) {
return null
}
params[pindex] = decoded
currentNode = node

@@ -293,1 +295,10 @@ path = ''

}
function fastDecode (path) {
errored = false
try {
return decodeURIComponent(path)
} catch (err) {
errored = true
}
}
{
"name": "find-my-way",
"version": "1.2.0",
"version": "1.2.1",
"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