@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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@shakerquiz/utilities",
4
- "version": "0.5.71",
4
+ "version": "0.5.73",
5
5
  "author": "yurkimus <yurkimus@gmail.com>",
6
6
  "license": "ISC",
7
7
  "repository": {
@@ -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
  */
@@ -1,6 +1,16 @@
1
1
  {
2
2
  "type": "object",
3
- "properties": {},
4
- "required": [],
3
+ "properties": {
4
+ "template": {
5
+ "type": "string"
6
+ },
7
+ "text": {
8
+ "type": "string"
9
+ }
10
+ },
11
+ "required": [
12
+ "template",
13
+ "text"
14
+ ],
5
15
  "additionalProperties": false
6
16
  }
@@ -1,11 +1,15 @@
1
1
  {
2
2
  "type": "object",
3
3
  "properties": {
4
+ "template": {
5
+ "type": "string"
6
+ },
4
7
  "text": {
5
8
  "type": "string"
6
9
  }
7
10
  },
8
11
  "required": [
12
+ "template",
9
13
  "text"
10
14
  ],
11
15
  "additionalProperties": false