@pirxpilot/router 2.0.2 → 2.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/lib/matcher.js +1 -1
  2. package/package.json +1 -1
package/lib/matcher.js CHANGED
@@ -51,7 +51,7 @@ const PARAMETER_REGEXP = /\/:([a-zA-Z_]\w*)/g;
51
51
 
52
52
  export function createURLPatternMatcher(pathname, { sensitive, end, strict }) {
53
53
  // Extract parameter names from the pattern in order
54
- const parameterOrder = pathname.matchAll(PARAMETER_REGEXP).map(m => m[1]);
54
+ const parameterOrder = Array.from(pathname.matchAll(PARAMETER_REGEXP), m => m[1]);
55
55
 
56
56
  // Build the pattern:
57
57
  // - For end=false (prefix matching): add {/*}? to match optional trailing content
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pirxpilot/router",
3
3
  "description": "Simple middleware-style router",
4
- "version": "2.0.2",
4
+ "version": "2.0.3",
5
5
  "author": "Douglas Christopher Wilson <doug@somethingdoug.com>",
6
6
  "contributors": [
7
7
  "Blake Embrey <hello@blakeembrey.com>"