A route pattern matcher using regular expressions.
- Simple API
- Strict parsing (See parser rules)
- Supports named & unnamed parameters
- Supports custom regular experssions
- Parameters can be repeated or optional
https://route-matcher.pages.dev/tester
# With npm
$ npm install @open-tech-world/route-matcher
# With yarn
$ yarn add @open-tech-world/route-matcher
import { routeMatcher } from "@open-tech-world/route-matcher";
routeMatcher(route: string, path: string): RouteSegment[] | null;
// Eg: routeMatcher("/path/:param", "/path/value");
Please read the complete documentation at: https://route-matcher.pages.dev/
Copyright (c) Thanga Ganapathy (MIT License).