multi-path-matcher
Advanced tools
Comparing version 1.3.2 to 1.4.0
{ | ||
"name": "multi-path-matcher", | ||
"version": "1.3.2", | ||
"version": "1.4.0", | ||
"type": "module", | ||
@@ -5,0 +5,0 @@ "publishConfig": { |
@@ -22,2 +22,3 @@ [![npm](https://img.shields.io/npm/v/multi-path-matcher.svg)](https://www.npmjs.com/package/multi-path-matcher) | ||
With paramus | ||
```js | ||
@@ -40,4 +41,4 @@ import { compile, matcher } from "multi-path-matcher"; | ||
matcher(compiled, "/d/value1/e"); // routes[3] { att1: "value1" } | ||
matcher(compileds, "/d/value1/e/value2"); // routes[2] { att1: "value1", att2: "value2" } | ||
matcher(macro, routes, "/"); // routes[4] | ||
matcher(compiled, "/d/value1/e/value2"); // routes[2] { att1: "value1", att2: "value2" } | ||
matcher(compiled, "/"); // routes[4] | ||
``` | ||
@@ -65,3 +66,2 @@ | ||
# API | ||
@@ -74,2 +74,3 @@ | ||
- [CompiledRoutes](#compiledroutes) | ||
- [Parameters](#parameters) | ||
- [Route](#route) | ||
@@ -80,9 +81,9 @@ - [Properties](#properties) | ||
- [compile](#compile) | ||
- [Parameters](#parameters) | ||
- [Parameters](#parameters-1) | ||
- [CompiledRoute](#compiledroute) | ||
- [Properties](#properties-2) | ||
- [pathToRegexp](#pathtoregexp) | ||
- [Parameters](#parameters-1) | ||
- [Parameters](#parameters-2) | ||
- [matcher](#matcher) | ||
- [Parameters](#parameters-2) | ||
- [Parameters](#parameters-3) | ||
@@ -95,2 +96,8 @@ ## CompiledRoutes | ||
### Parameters | ||
- `priority` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** | ||
- `keys` **[Set](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Set)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>** | ||
- `regex` **RegEx** | ||
## Route | ||
@@ -141,2 +148,3 @@ | ||
- `regex` **[RegExp](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp)** for later checking and params extration | ||
- `keys` **[Set](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Set)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>** all keys found in the route | ||
- `priority` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** order in which to check | ||
@@ -146,2 +154,4 @@ | ||
Generate as regex with priority | ||
### Parameters | ||
@@ -148,0 +158,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
11349
92
177