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

find-my-way

Package Overview
Dependencies
Maintainers
2
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.3.1 to 1.3.2

44

index.js

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

var handle = currentNode.getHandler(method)
if (handle === null) break
if (!handle) return null

@@ -209,16 +209,24 @@ var paramNames = handle.params

currentNode = node
} else if (kind === 1) { // parametric route
continue
}
// parametric route
if (kind === 1) {
currentNode = node
i = 0
for (; i < pathLen && path.charCodeAt(i) !== 47; i++) {}
decoded = fastDecode(path.substring(0, i))
while (i < pathLen && path.charCodeAt(i) !== 47) i++
decoded = fastDecode(path.slice(0, i))
if (errored) {
break
return null
}
params[pindex++] = decoded
path = path.substring(i)
} else if (kind === 2) { // wildcard route
path = path.slice(i)
continue
}
// wildcard route
if (kind === 2) {
decoded = fastDecode(path)
if (errored) {
break
return null
}

@@ -228,17 +236,23 @@ params[pindex] = decoded

path = ''
} else if (kind === 3) { // parametric(regex) route
continue
}
// parametric(regex) route
if (kind === 3) {
currentNode = node
i = 0
for (; i < pathLen && path.charCodeAt(i) !== 47; i++) {}
while (i < pathLen && path.charCodeAt(i) !== 47) i++
decoded = fastDecode(path.slice(0, i))
if (errored) {
break
return null
}
if (!node.regex.test(decoded)) break
if (!node.regex.test(decoded)) return
params[pindex++] = decoded
path = path.slice(i)
} else if (len !== prefixLen) break // route not found
continue
}
// route not found
if (len !== prefixLen) return null
}
return null
}

@@ -245,0 +259,0 @@

{
"name": "find-my-way",
"version": "1.3.1",
"version": "1.3.2",
"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