@shakerquiz/utilities 0.5.148 → 0.5.149
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
|
@@ -53,12 +53,10 @@ export var ModeTitle = {
|
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
/** @returns {typeof Mode[keyof typeof Mode]} */
|
|
56
|
-
var infer = value =>
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
throw TypeError(`Cannot infer mode for value '${value}'.`)
|
|
61
|
-
}
|
|
56
|
+
var infer = value =>
|
|
57
|
+
value in Mode
|
|
58
|
+
? Mode[value]
|
|
59
|
+
: Mode['Unknown']
|
|
62
60
|
|
|
63
61
|
/**
|
|
64
62
|
* @returns {typeof Mode[keyof typeof Mode]}
|