
Security News
Open Source CAI Framework Handles Pen Testing Tasks up to 3,600× Faster Than Humans
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
multi-path-matcher
Advanced tools
finds and decodes best matching path in a set of routes
import { compile, matcher } from "multi-path-matcher";
const routes = [
{ path: "/a/b/c" },
{ path: "/a/b" },
{ path: "/d/:att1/e/:att2" },
{ path: "/d/:att1/e" },
{ path: "/" }
];
const compiled = compile(routes);
matcher(compiled "/a"); // undefined
matcher(compiled, "/a/b"); // routes[1]
matcher(compiled, "/a/b/c"); // routes[0]
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]
Result of the routes compilation
Type: Object
one single route
Type: Object
path
stringresult of a match
Type: Object
Compile a set of routes
Returns CompiledRoutes
Find best match for a given path
compiled
CompiledRoutespath
stringReturns Match match
With npm do:
npm install multi-path-matcher
BSD-2-Clause
FAQs
Finds and decodes best matching path in a set of routes
The npm package multi-path-matcher receives a total of 54 weekly downloads. As such, multi-path-matcher popularity was classified as not popular.
We found that multi-path-matcher demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.
Security News
CVEForecast.org uses machine learning to project a record-breaking surge in vulnerability disclosures in 2025.