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.17.0 to 1.17.1

test/full-url.test.js

10

index.js

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

const httpMethods = http.METHODS
const FULL_PATH_REGEXP = /^https?:\/\/.*\//
if (!isRegexSafe(FULL_PATH_REGEXP)) {
throw new Error('the FULL_PATH_REGEXP is not safe, update this module')
}
function Router (opts) {

@@ -333,2 +338,7 @@ if (!(this instanceof Router)) {

}
if (path.charCodeAt(0) !== 47) { // 47 is '/'
path = path.replace(FULL_PATH_REGEXP, '/')
}
var maxParamLength = this.maxParamLength

@@ -335,0 +345,0 @@ var currentNode = this.tree

2

package.json
{
"name": "find-my-way",
"version": "1.17.0",
"version": "1.17.1",
"description": "Crazy fast http radix based router",

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

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

findMyWay.on('GET', '/Foo/bar/:param', (req, res, params) => {
console.log('baz')
t.equal(params.param, 'baz')

@@ -126,3 +125,2 @@ })

findMyWay.on('GET', '/Foo/bar/:param', (req, res, params) => {
console.log('baz')
t.equal(params.param, 'baz')

@@ -132,3 +130,2 @@ })

findMyWay.on('GET', '/Foo/baz/:param', (req, res, params) => {
console.log('bar')
t.equal(params.param, 'bar')

@@ -135,0 +132,0 @@ })

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