@shakerquiz/utilities 0.5.165 → 0.5.167
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,11 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export var Network = /** @type {const} */ ({
|
|
1
|
+
export const Network = Object.freeze({
|
|
4
2
|
'Docker': 'Docker',
|
|
5
3
|
'Public': 'Public',
|
|
6
4
|
})
|
|
7
5
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
Network['Public'],
|
|
11
|
-
]
|
|
6
|
+
/** @returns {keyof typeof Network | 'Unknown'} */
|
|
7
|
+
export const inferNetwork = x => Network[x] ?? 'Unknown'
|
|
@@ -521,3 +521,27 @@ export const ServiceRoutes = Object.freeze({
|
|
|
521
521
|
|
|
522
522
|
[Service['Vkma']]: Object.freeze([]),
|
|
523
523
|
})
|
|
524
|
+
|
|
525
|
+
/** @returns {keyof typeof Route | 'Unknown'} */
|
|
526
|
+
export const inferRoute = x => Route[x] ?? 'Unknown'
|
|
527
|
+
|
|
528
|
+
/** @returns {keyof typeof RouteNumerosity | 'Unknown'} */
|
|
529
|
+
export const inferRouteNumerosity = x => RouteNumerosity[x] ?? 'Unknown'
|
|
530
|
+
|
|
531
|
+
/** @returns {keyof typeof RouteRelation | 'Unknown'} */
|
|
532
|
+
export const inferRouteRelation = x => RouteRelation[x] ?? 'Unknown'
|
|
533
|
+
|
|
534
|
+
/** @returns {keyof typeof RoutePathname | 'Unknown'} */
|
|
535
|
+
export const inferRoutePathname = x => RoutePathname[x] ?? 'Unknown'
|
|
536
|
+
|
|
537
|
+
/** @returns {keyof typeof RouteKind | 'Unknown'} */
|
|
538
|
+
export const inferRouteKind = x => RouteKind[x] ?? 'Unknown'
|
|
539
|
+
|
|
540
|
+
/** @returns {keyof typeof RouteParams | 'Unknown'} */
|
|
541
|
+
export const inferRouteParams = x => RouteParams[x] ?? 'Unknown'
|
|
542
|
+
|
|
543
|
+
/** @returns {keyof typeof RouteService | 'Unknown'} */
|
|
544
|
+
export const inferRouteService = x => RouteService[x] ?? 'Unknown'
|
|
545
|
+
|
|
546
|
+
/** @returns {keyof typeof ServiceRoutes | 'Unknown'} */
|
|
547
|
+
export const inferServiceRoutes = x => ServiceRoutes[x] ?? 'Unknown'
|