@shakerquiz/utilities 0.5.71 → 0.5.73
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
|
@@ -518,6 +518,22 @@ export var getRouteKind = value => {
|
|
|
518
518
|
return 'Unknown'
|
|
519
519
|
}
|
|
520
520
|
|
|
521
|
+
/**
|
|
522
|
+
* @param {keyof typeof Route} value
|
|
523
|
+
*
|
|
524
|
+
* @returns {keyof typeof Service}
|
|
525
|
+
*/
|
|
526
|
+
export var getRouteService = value => {
|
|
527
|
+
var route = getRoute(value)
|
|
528
|
+
|
|
529
|
+
if (!(route in RouteService))
|
|
530
|
+
throw TypeError(
|
|
531
|
+
`[getRouteService] Route '${route}' must be a member of RouteService.`,
|
|
532
|
+
)
|
|
533
|
+
|
|
534
|
+
return RouteService[route]
|
|
535
|
+
}
|
|
536
|
+
|
|
521
537
|
/**
|
|
522
538
|
* @param {keyof Route} value
|
|
523
539
|
*/
|