@thi.ng/router 4.1.56 → 4.1.58

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/package.json +6 -6
  2. package/router.js +10 -7
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/router",
3
- "version": "4.1.56",
3
+ "version": "4.1.58",
4
4
  "description": "Generic trie-based router with support for wildcards, route param validation/coercion, auth",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -40,10 +40,10 @@
40
40
  "tool:tangle": "../../node_modules/.bin/tangle src/**/*.ts"
41
41
  },
42
42
  "dependencies": {
43
- "@thi.ng/api": "^8.12.15",
44
- "@thi.ng/checks": "^3.8.5",
45
- "@thi.ng/equiv": "^2.1.105",
46
- "@thi.ng/errors": "^2.6.4"
43
+ "@thi.ng/api": "^8.12.17",
44
+ "@thi.ng/checks": "^3.8.7",
45
+ "@thi.ng/equiv": "^2.1.106",
46
+ "@thi.ng/errors": "^2.6.6"
47
47
  },
48
48
  "devDependencies": {
49
49
  "esbuild": "^0.27.2",
@@ -101,5 +101,5 @@
101
101
  ],
102
102
  "year": 2014
103
103
  },
104
- "gitHead": "8f50352caab9ec7757d645c0afa605dfb5427abe\n"
104
+ "gitHead": "1107498d31504dc63d1a457b5def387d7a134f69\n"
105
105
  }
package/router.js CHANGED
@@ -160,13 +160,16 @@ let Router = class {
160
160
  );
161
161
  }
162
162
  let hasParams = false;
163
- const params = match.reduce((acc, x, i) => {
164
- if (__isRouteParam(x)) {
165
- hasParams = true;
166
- acc[i] = x.substring(1);
167
- }
168
- return acc;
169
- }, {});
163
+ const params = match.reduce(
164
+ (acc, x, i) => {
165
+ if (__isRouteParam(x)) {
166
+ hasParams = true;
167
+ acc[i] = x.substring(1);
168
+ }
169
+ return acc;
170
+ },
171
+ {}
172
+ );
170
173
  return {
171
174
  spec: route,
172
175
  id: route.id,