@shakerquiz/utilities 0.5.142 → 0.5.144

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.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@shakerquiz/utilities",
4
- "version": "0.5.142",
4
+ "version": "0.5.144",
5
5
  "author": "yurkimus <yurkimus@gmail.com>",
6
6
  "license": "ISC",
7
7
  "repository": {
@@ -3,7 +3,7 @@ import { guardKey } from '../functions/infer.js'
3
3
  import { isTag } from '../functions/tag.js'
4
4
 
5
5
  export var hydrateRoutePathname = (maybeRoute, maybeRouteParams) => {
6
- if (isTag('Array', maybeRouteParams))
6
+ if (!isTag('Array', maybeRouteParams))
7
7
  throw TypeError(`Parameter 'maybeRouteParams' must be 'Array'.`)
8
8
 
9
9
  var route = guardKey(Route, maybeRoute)
@@ -27,3 +27,11 @@ export var guardKey = (Enumeration, value) => {
27
27
 
28
28
  return key
29
29
  }
30
+
31
+ /**
32
+ * @template {*} E
33
+ *
34
+ * @param {E} Enumeration
35
+ * @param {E[keyof E]} value
36
+ */
37
+ export var isKey = (Enumeration, value) => value in Enumeration