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.1 to 1.3.2

4

package.json
{
"name": "multi-path-matcher",
"version": "1.3.1",
"version": "1.3.2",
"type": "module",

@@ -37,3 +37,3 @@ "publishConfig": {

"engines": {
"node": ">=10.16.1"
"node": ">=10.16.2"
},

@@ -40,0 +40,0 @@ "repository": {

@@ -21,2 +21,3 @@ [![npm](https://img.shields.io/npm/v/multi-path-matcher.svg)](https://www.npmjs.com/package/multi-path-matcher)

With paramus
```js

@@ -43,2 +44,23 @@ import { compile, matcher } from "multi-path-matcher";

With wildcards
```js
import { compile, matcher } from "multi-path-matcher";
const routes = [
{ path: "/" },
{ path: "/*" },
{ path: "/about"},
{ path: "/login" }
];
const compiled = compile(routes);
matcher(compiled "/"); // routes[0]
matcher(compiled "/index.html"); // routes[1]
matcher(compiled "/about"); // routes[2]
matcher(compiled "/login"); // routes[3]
```
# API

@@ -45,0 +67,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