@shakerquiz/utilities 4.0.103 → 4.0.105
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
|
@@ -73,6 +73,8 @@ export const RouteExcessiveCardinality = Object.freeze(
|
|
|
73
73
|
'registration/search': '1/1',
|
|
74
74
|
'registration/status/search': '1/1/1',
|
|
75
75
|
'registration/creation': '1/1',
|
|
76
|
+
'registration/creation/landing/team': '1/1/1/1',
|
|
77
|
+
'registration/creation/landing/group': '1/1/1/1',
|
|
76
78
|
'registration/confirmation': '1/1',
|
|
77
79
|
'registration/cancellation': '1/1',
|
|
78
80
|
'registration/lineup/search': '1/1/1',
|
|
@@ -195,6 +197,8 @@ export const RouteCardinality = Object.freeze(
|
|
|
195
197
|
'registration/search': '1/1',
|
|
196
198
|
'registration/status/search': '1/1',
|
|
197
199
|
'registration/creation': '1/1',
|
|
200
|
+
'registration/creation/landing/team': '1/1',
|
|
201
|
+
'registration/creation/landing/group': '1/1',
|
|
198
202
|
'registration/confirmation': '1/1',
|
|
199
203
|
'registration/cancellation': '1/1',
|
|
200
204
|
'registration/lineup/search': '1/1',
|
|
@@ -317,6 +321,8 @@ export const RoutePathname = Object.freeze(
|
|
|
317
321
|
'registration/search': 'registration/:registration/search',
|
|
318
322
|
'registration/status/search': 'registration/:registration/status/search',
|
|
319
323
|
'registration/creation': 'registration/:registration/creation',
|
|
324
|
+
'registration/creation/landing/team': 'registration/:registration/creation/landing/team',
|
|
325
|
+
'registration/creation/landing/group': 'registration/:registration/creation/landing/group',
|
|
320
326
|
'registration/confirmation': 'registration/:registration/confirmation',
|
|
321
327
|
'registration/cancellation': 'registration/:registration/cancellation',
|
|
322
328
|
'registration/lineup/search': 'registration/:registration/lineup/search',
|
|
@@ -569,6 +575,12 @@ export const RouteParameters = Object.freeze(
|
|
|
569
575
|
'registration/creation': [
|
|
570
576
|
':registration',
|
|
571
577
|
],
|
|
578
|
+
'registration/creation/landing/team': [
|
|
579
|
+
':registration',
|
|
580
|
+
],
|
|
581
|
+
'registration/creation/landing/group': [
|
|
582
|
+
':registration',
|
|
583
|
+
],
|
|
572
584
|
'registration/confirmation': [
|
|
573
585
|
':registration',
|
|
574
586
|
],
|
|
@@ -758,6 +770,8 @@ export const PathnameRoute = Object.freeze(
|
|
|
758
770
|
'registration/:registration/search': 'registration/search',
|
|
759
771
|
'registration/:registration/status/search': 'registration/status/search',
|
|
760
772
|
'registration/:registration/creation': 'registration/creation',
|
|
773
|
+
'registration/:registration/creation/landing/team': 'registration/creation/landing/team',
|
|
774
|
+
'registration/:registration/creation/landing/group': 'registration/creation/landing/group',
|
|
761
775
|
'registration/:registration/confirmation': 'registration/confirmation',
|
|
762
776
|
'registration/:registration/cancellation': 'registration/cancellation',
|
|
763
777
|
'registration/:registration/lineup/search': 'registration/lineup/search',
|
|
@@ -1010,6 +1024,12 @@ export const PathnameParameters = Object.freeze(
|
|
|
1010
1024
|
'registration/:registration/creation': [
|
|
1011
1025
|
':registration',
|
|
1012
1026
|
],
|
|
1027
|
+
'registration/:registration/creation/landing/team': [
|
|
1028
|
+
':registration',
|
|
1029
|
+
],
|
|
1030
|
+
'registration/:registration/creation/landing/group': [
|
|
1031
|
+
':registration',
|
|
1032
|
+
],
|
|
1013
1033
|
'registration/:registration/confirmation': [
|
|
1014
1034
|
':registration',
|
|
1015
1035
|
],
|
|
@@ -1215,6 +1235,8 @@ export const RouteBreakdown = Object.freeze(
|
|
|
1215
1235
|
'registration/search': 'registration/search',
|
|
1216
1236
|
'registration/status/search': 'registration/status/search',
|
|
1217
1237
|
'registration/creation': 'registration/creation',
|
|
1238
|
+
'registration/creation/landing/team': 'registration/creation/landing/team',
|
|
1239
|
+
'registration/creation/landing/group': 'registration/creation/landing/group',
|
|
1218
1240
|
'registration/confirmation': 'registration/confirmation',
|
|
1219
1241
|
'registration/cancellation': 'registration/cancellation',
|
|
1220
1242
|
'registration/lineup/search': 'registration/lineup/search',
|
|
@@ -1378,6 +1400,8 @@ export const RouteRelation = Object.freeze(
|
|
|
1378
1400
|
'registration/search': 'registration/search',
|
|
1379
1401
|
'registration/status/search': 'status/search',
|
|
1380
1402
|
'registration/creation': 'registration/creation',
|
|
1403
|
+
'registration/creation/landing/team': 'landing/team',
|
|
1404
|
+
'registration/creation/landing/group': 'landing/group',
|
|
1381
1405
|
'registration/confirmation': 'registration/confirmation',
|
|
1382
1406
|
'registration/cancellation': 'registration/cancellation',
|
|
1383
1407
|
'registration/lineup/search': 'lineup/search',
|
|
@@ -1500,6 +1524,8 @@ export const RouteService = Object.freeze(
|
|
|
1500
1524
|
'registration/search': 'Registrations',
|
|
1501
1525
|
'registration/status/search': 'Registrations',
|
|
1502
1526
|
'registration/creation': 'Registrations',
|
|
1527
|
+
'registration/creation/landing/team': 'Registrations',
|
|
1528
|
+
'registration/creation/landing/group': 'Registrations',
|
|
1503
1529
|
'registration/confirmation': 'Registrations',
|
|
1504
1530
|
'registration/cancellation': 'Registrations',
|
|
1505
1531
|
'registration/lineup/search': 'Registrations',
|
|
@@ -1641,6 +1667,8 @@ export const ServiceRoutes = Object.freeze(
|
|
|
1641
1667
|
'registration/search',
|
|
1642
1668
|
'registration/status/search',
|
|
1643
1669
|
'registration/creation',
|
|
1670
|
+
'registration/creation/landing/team',
|
|
1671
|
+
'registration/creation/landing/group',
|
|
1644
1672
|
'registration/confirmation',
|
|
1645
1673
|
'registration/cancellation',
|
|
1646
1674
|
'registration/lineup/search',
|
|
@@ -71,6 +71,8 @@ export const Routes = Object.freeze(
|
|
|
71
71
|
'registration/search',
|
|
72
72
|
'registration/status/search',
|
|
73
73
|
'registration/creation',
|
|
74
|
+
'registration/creation/landing/team',
|
|
75
|
+
'registration/creation/landing/group',
|
|
74
76
|
'registration/confirmation',
|
|
75
77
|
'registration/cancellation',
|
|
76
78
|
'registration/lineup/search',
|
|
@@ -300,6 +300,39 @@ export const Segments = Object.freeze(
|
|
|
300
300
|
kind: 'Operation',
|
|
301
301
|
}),
|
|
302
302
|
),
|
|
303
|
+
Object.freeze(
|
|
304
|
+
/** @type {const} */ ({
|
|
305
|
+
key: 'landing',
|
|
306
|
+
cardinality: '1',
|
|
307
|
+
singular: 'landing',
|
|
308
|
+
plural: 'landings',
|
|
309
|
+
service: null,
|
|
310
|
+
pattern: null,
|
|
311
|
+
kind: 'Integration',
|
|
312
|
+
}),
|
|
313
|
+
),
|
|
314
|
+
Object.freeze(
|
|
315
|
+
/** @type {const} */ ({
|
|
316
|
+
key: 'team',
|
|
317
|
+
cardinality: '1',
|
|
318
|
+
singular: 'team',
|
|
319
|
+
plural: 'teams',
|
|
320
|
+
service: null,
|
|
321
|
+
pattern: null,
|
|
322
|
+
kind: 'Integration',
|
|
323
|
+
}),
|
|
324
|
+
),
|
|
325
|
+
Object.freeze(
|
|
326
|
+
/** @type {const} */ ({
|
|
327
|
+
key: 'group',
|
|
328
|
+
cardinality: '1',
|
|
329
|
+
singular: 'group',
|
|
330
|
+
plural: 'groups',
|
|
331
|
+
service: null,
|
|
332
|
+
pattern: null,
|
|
333
|
+
kind: 'Integration',
|
|
334
|
+
}),
|
|
335
|
+
),
|
|
303
336
|
Object.freeze(
|
|
304
337
|
/** @type {const} */ ({
|
|
305
338
|
key: 'confirmation',
|
package/source/helpers/object.js
CHANGED
|
@@ -1,46 +1,74 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @
|
|
2
|
+
* @param {object} o
|
|
3
|
+
* @param {...PropertyKey} ks
|
|
3
4
|
*/
|
|
4
|
-
export const hasOwn =
|
|
5
|
+
export const hasOwn = (o, ...ks) => {
|
|
6
|
+
if (o === null)
|
|
7
|
+
return false
|
|
8
|
+
else if (o === undefined)
|
|
9
|
+
return false
|
|
10
|
+
else if (ks.length < 1)
|
|
11
|
+
return false
|
|
12
|
+
else
|
|
13
|
+
return ks.every(v => Object.hasOwn(o, v))
|
|
14
|
+
}
|
|
5
15
|
|
|
6
16
|
/**
|
|
7
17
|
* @param {object} o
|
|
8
|
-
* @param {PropertyKey}
|
|
18
|
+
* @param {PropertyKey} k
|
|
9
19
|
*
|
|
10
20
|
* @returns {*}
|
|
11
21
|
*/
|
|
12
|
-
export const tryOwn = (o,
|
|
22
|
+
export const tryOwn = (o, k) => hasOwn(o, k) ? o[k] : undefined
|
|
13
23
|
|
|
14
24
|
/**
|
|
15
25
|
* @param {object} o
|
|
16
|
-
* @param {PropertyKey}
|
|
26
|
+
* @param {PropertyKey} k
|
|
17
27
|
*
|
|
18
28
|
* @throws {TypeError}
|
|
19
29
|
*
|
|
20
30
|
* @returns {any}
|
|
21
31
|
*/
|
|
22
|
-
export const getOwn = (o,
|
|
23
|
-
if (!hasOwn(o,
|
|
24
|
-
throw TypeError(`Property '${
|
|
32
|
+
export const getOwn = (o, k) => {
|
|
33
|
+
if (!hasOwn(o, k))
|
|
34
|
+
throw TypeError(`Property '${k}' is not assigned.`)
|
|
25
35
|
|
|
26
|
-
|
|
27
|
-
throw TypeError(`Property '${v}' is not undefined.`)
|
|
36
|
+
var v = tryOwn(o, k)
|
|
28
37
|
|
|
29
|
-
|
|
30
|
-
}
|
|
38
|
+
if (v === undefined)
|
|
39
|
+
throw TypeError(`Property '${k}' is undefined.`)
|
|
31
40
|
|
|
32
|
-
|
|
33
|
-
|
|
41
|
+
return v
|
|
42
|
+
}
|
|
34
43
|
|
|
35
|
-
|
|
44
|
+
/**
|
|
45
|
+
* @param {object} o
|
|
46
|
+
* @param {PropertyKey} k
|
|
47
|
+
* @param {any} v
|
|
48
|
+
*/
|
|
49
|
+
export const setOwn = (o, k, v) => ({ ...o, [k]: v })
|
|
36
50
|
|
|
37
|
-
|
|
38
|
-
|
|
51
|
+
/**
|
|
52
|
+
* @deprecated
|
|
53
|
+
*
|
|
54
|
+
* @param {object} o
|
|
55
|
+
* @param {PropertyKey} k
|
|
56
|
+
* @param {any} v
|
|
57
|
+
*/
|
|
58
|
+
export const set = setOwn
|
|
39
59
|
|
|
40
|
-
|
|
41
|
-
|
|
60
|
+
/**
|
|
61
|
+
* @param {object} o
|
|
62
|
+
* @param {...object} os
|
|
63
|
+
*/
|
|
64
|
+
export const assignOwn = (o, ...os) => Object.assign({}, o, ...os)
|
|
42
65
|
|
|
43
|
-
|
|
66
|
+
/**
|
|
67
|
+
* @param {object} o
|
|
68
|
+
* @param {PropertyKey} k
|
|
69
|
+
*/
|
|
70
|
+
export const removeOwn = (o, k) => {
|
|
71
|
+
var { [k]: _, ...x } = o
|
|
44
72
|
|
|
45
|
-
return
|
|
73
|
+
return x
|
|
46
74
|
}
|