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.15.2 to 1.15.3

test/issue-93.test.js

2

node.js

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

this.parametricBrother = null
this.versions = SemVerStore()
this.versions = versions || SemVerStore()
}

@@ -30,0 +30,0 @@

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

@@ -32,4 +32,4 @@ "main": "index.js",

"pre-commit": "^1.2.2",
"request": "^2.87.0",
"standard": "^11.0.1",
"request": "^2.88.0",
"standard": "^12.0.1",
"tap": "^12.0.1"

@@ -36,0 +36,0 @@ },

@@ -171,11 +171,23 @@ # find-my-way

##### Match order
The routes are matched in the following order:
```
static
parametric
wildcards
parametric(regex)
multi parametric(regex)
```
The routing algorithm matches one chunk at a time (where the chunk is a string between two slashes),
this means that it cannot know if a route is static or dynamic until it finishes to match the URL.
The chunks are matched in the following order:
1. static
1. parametric
1. wildcards
1. parametric(regex)
1. multi parametric(regex)
So if you declare the following routes
- `/:userId/foo/bar`
- `/33/:a(^.*$)/:b`
and the URL of the incoming request is /33/foo/bar,
the second route will be matched because the first chunk (33) matches the static chunk.
If the URL would have been /32/foo/bar, the first route would have been matched.
<a name="supported-methods"></a>

@@ -182,0 +194,0 @@ ##### Supported methods

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