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

multi-path-matcher

Package Overview
Dependencies
Maintainers
1
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

multi-path-matcher - npm Package Compare versions

Comparing version 1.3.2 to 1.4.0

2

package.json
{
"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

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