@shakerquiz/utilities 0.5.169 → 0.5.171

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.169",
4
+ "version": "0.5.171",
5
5
  "author": "yurkimus <yurkimus@gmail.com>",
6
6
  "license": "ISC",
7
7
  "repository": {
@@ -5,7 +5,7 @@ import { Mode } from './mode.js'
5
5
  * - HTTP/1.1 (Core Methods): {@link https://datatracker.ietf.org/doc/html/rfc7231#section-4.3}
6
6
  * - PATCH: {@link https://datatracker.ietf.org/doc/html/rfc5789}
7
7
  */
8
- export var Method = /** @type {const} */ ({
8
+ export const Method = Object.freeze({
9
9
  'OPTIONS': 'OPTIONS',
10
10
  'GET': 'GET',
11
11
  'POST': 'POST',
@@ -13,12 +13,3 @@ export var Method = /** @type {const} */ ({
13
13
  'PATCH': 'PATCH',
14
14
  'DELETE': 'DELETE',
15
15
  })
16
-
17
- export var Methods = [
18
- Method['OPTIONS'],
19
- Method['GET'],
20
- Method['POST'],
21
- Method['PUT'],
22
- Method['PATCH'],
23
- Method['DELETE'],
24
- ]
@@ -1,4 +1,4 @@
1
- export var Numerosity = /** @type {const} */ ({
1
+ export const Numerosity = Object.freeze({
2
2
  Singular: 'Singular',
3
3
  Dual: 'Dual',
4
4
  Plural: 'Plural',
@@ -558,29 +558,29 @@ export const ServiceRoutes = Object.freeze({
558
558
  [Service['Vkma']]: Object.freeze([]),
559
559
  })
560
560
 
561
- /** @returns {keyof typeof Route | 'Unknown'} */
561
+ /** @returns {typeof Route[keyof typeof Route] | 'Unknown'} */
562
562
  export const inferRoute = x => Route[x] ?? 'Unknown'
563
563
 
564
- /** @returns {keyof typeof RouteNumerosity | 'Unknown'} */
564
+ /** @returns {typeof RouteNumerosity[keyof typeof RouteNumerosity] | 'Unknown'} */
565
565
  export const inferRouteNumerosity = x => RouteNumerosity[x] ?? 'Unknown'
566
566
 
567
- /** @returns {keyof typeof RouteRelation | 'Unknown'} */
567
+ /** @returns {typeof RouteRelation[keyof typeof RouteRelation] | 'Unknown'} */
568
568
  export const inferRouteRelation = x => RouteRelation[x] ?? 'Unknown'
569
569
 
570
- /** @returns {keyof typeof RoutePathname | 'Unknown'} */
570
+ /** @returns {typeof RoutePathname[keyof typeof RoutePathname] | 'Unknown'} */
571
571
  export const inferRoutePathname = x => RoutePathname[x] ?? 'Unknown'
572
572
 
573
- /** @returns {keyof typeof RouteKind | 'Unknown'} */
573
+ /** @returns {typeof RouteKind[keyof typeof RouteKind] | 'Unknown'} */
574
574
  export const inferRouteKind = x => RouteKind[x] ?? 'Unknown'
575
575
 
576
- /** @returns {keyof typeof CompositeRouteField | 'Unknown'} */
576
+ /** @returns {typeof CompositeRouteField[keyof typeof CompositeRouteField] | 'Unknown'} */
577
577
  export const inferCompositeRouteField = x => CompositeRouteField[x] ?? 'Unknown'
578
578
 
579
- /** @returns {keyof typeof RouteParams | 'Unknown'} */
579
+ /** @returns {typeof RouteParams[keyof typeof RouteParams] | 'Unknown'} */
580
580
  export const inferRouteParams = x => RouteParams[x] ?? 'Unknown'
581
581
 
582
- /** @returns {keyof typeof RouteService | 'Unknown'} */
582
+ /** @returns {typeof RouteService[keyof typeof RouteService] | 'Unknown'} */
583
583
  export const inferRouteService = x => RouteService[x] ?? 'Unknown'
584
584
 
585
- /** @returns {keyof typeof ServiceRoutes | 'Unknown'} */
585
+ /** @returns {typeof ServiceRoutes[keyof typeof ServiceRoutes] | 'Unknown'} */
586
586
  export const inferServiceRoutes = x => ServiceRoutes[x] ?? 'Unknown'