node-match-path
Advanced tools
Comparing version 0.5.0 to 0.5.1
@@ -22,3 +22,3 @@ 'use strict'; | ||
// Replace parameters with named capturing groups | ||
.replace(/:([^\d|^\/][a-zA-Z0-9]*(?=(?:\/|\\.)|$))/g, (_, match) => `(?<${match}>.+?)`) | ||
.replace(/:([^\d|^\/][a-zA-Z0-9_]*(?=(?:\/|\\.)|$))/g, (_, match) => `(?<${match}>.+?)`) | ||
// Allow optional trailing slash | ||
@@ -25,0 +25,0 @@ .concat('(\\/|$)'); |
@@ -18,3 +18,3 @@ /** | ||
// Replace parameters with named capturing groups | ||
.replace(/:([^\d|^\/][a-zA-Z0-9]*(?=(?:\/|\\.)|$))/g, (_, match) => `(?<${match}>.+?)`) | ||
.replace(/:([^\d|^\/][a-zA-Z0-9_]*(?=(?:\/|\\.)|$))/g, (_, match) => `(?<${match}>.+?)`) | ||
// Allow optional trailing slash | ||
@@ -21,0 +21,0 @@ .concat('(\\/|$)'); |
{ | ||
"name": "node-match-path", | ||
"version": "0.5.0", | ||
"version": "0.5.1", | ||
"description": "Dependency-free request URI matcher", | ||
@@ -5,0 +5,0 @@ "esnext": "src/index.ts", |
6080