Tiny Route Pattern to RegExp Utility

JSON →
library 3.0.0 ·javascript
verified May 27, 2026

regexparam is a minimalist (399B) utility designed to convert URL-like route patterns (e.g., `/users/:id`) into JavaScript `RegExp` objects, extracting parameter keys in the process. It serves as a more lightweight and focused alternative to libraries like `path-to-regexp`. The current stable version is `3.0.0`. Releases occur periodically, addressing bug fixes and introducing minor breaking changes, typically every few months for major versions. Key differentiators include its extremely small footprint and its specific focus on basic routing patterns: static, parameter (with or without suffixes), optional parameters, wildcards, and optional wildcards. Unlike more comprehensive routing solutions, regexparam only handles parsing string patterns and does not manage a `keys` dictionary directly or mutate variables. It ships with CommonJS, ESModule, and UMD formats and includes TypeScript type definitions.

total hits 17
actors 6 distinct systems
last hit 5d ago AhrefsBot
GPTBot
5
MetaBot
4
Script
1
ClaudeBot
1
ChatGPT-User
1
Humans
2

top countries 🇺🇸 United States · 🇨🇦 Canada · 🇩🇪 Germany