Socket
Socket
Sign inDemoInstall

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 3.0.0 to 3.0.1

test/issue-151.test.js

2

index.js

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

const httpMethods = http.METHODS
const FULL_PATH_REGEXP = /^https?:\/\/.*\//
const FULL_PATH_REGEXP = /^https?:\/\/.*?\//

@@ -24,0 +24,0 @@ if (!isRegexSafe(FULL_PATH_REGEXP)) {

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

child = this.children[':'] || this.children['*']
child = this.children[':']
if (child !== undefined && (child.numberOfChildren > 0 || child.handlers[method] !== null)) {

@@ -131,2 +131,7 @@ return child

child = this.children['*']
if (child !== undefined && (child.numberOfChildren > 0 || child.handlers[method] !== null)) {
return child
}
return null

@@ -143,3 +148,3 @@ }

child = this.children[':'] || this.children['*']
child = this.children[':']
if (child !== undefined && (child.numberOfChildren > 0 || child.getVersionHandler(version, method) !== null)) {

@@ -149,2 +154,7 @@ return child

child = this.children['*']
if (child !== undefined && (child.numberOfChildren > 0 || child.getVersionHandler(version, method) !== null)) {
return child
}
return null

@@ -151,0 +161,0 @@ }

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

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

@@ -16,2 +16,6 @@ 'use strict'

findMyWay.on('GET', '/a/:id', (req, res) => {
res.end('{"message":"hello world"}')
})
t.deepEqual(findMyWay.find('GET', 'http://localhost/a'), findMyWay.find('GET', '/a'))

@@ -21,1 +25,6 @@ t.deepEqual(findMyWay.find('GET', 'http://localhost:8080/a'), findMyWay.find('GET', '/a'))

t.deepEqual(findMyWay.find('GET', 'https://localhost/a'), findMyWay.find('GET', '/a'))
t.deepEqual(findMyWay.find('GET', 'http://localhost/a/100'), findMyWay.find('GET', '/a/100'))
t.deepEqual(findMyWay.find('GET', 'http://localhost:8080/a/100'), findMyWay.find('GET', '/a/100'))
t.deepEqual(findMyWay.find('GET', 'http://123.123.123.123/a/100'), findMyWay.find('GET', '/a/100'))
t.deepEqual(findMyWay.find('GET', 'https://localhost/a/100'), findMyWay.find('GET', '/a/100'))
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