@shakerquiz/utilities 0.5.151 → 0.5.152
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
|
@@ -9,73 +9,73 @@ export var Quantifier = /** @type {const} */ ({
|
|
|
9
9
|
})
|
|
10
10
|
|
|
11
11
|
export var Quantifiers = [
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
Quantifier['Any'],
|
|
13
|
+
Quantifier['None'],
|
|
14
|
+
Quantifier['Single'],
|
|
15
|
+
Quantifier['Many'],
|
|
16
|
+
Quantifier['All'],
|
|
17
17
|
]
|
|
18
18
|
|
|
19
19
|
export var QuantifierQuantifiers = {
|
|
20
|
-
[
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
20
|
+
[Quantifier['Any']]: [
|
|
21
|
+
Quantifier['Any'],
|
|
22
|
+
Quantifier['None'],
|
|
23
|
+
Quantifier['Single'],
|
|
24
|
+
Quantifier['Many'],
|
|
25
|
+
Quantifier['All'],
|
|
26
26
|
],
|
|
27
27
|
|
|
28
|
-
[
|
|
29
|
-
|
|
28
|
+
[Quantifier['None']]: [
|
|
29
|
+
Quantifier['None'],
|
|
30
30
|
],
|
|
31
31
|
|
|
32
|
-
[
|
|
33
|
-
|
|
32
|
+
[Quantifier['Single']]: [
|
|
33
|
+
Quantifier['Single'],
|
|
34
34
|
],
|
|
35
35
|
|
|
36
|
-
[
|
|
37
|
-
|
|
36
|
+
[Quantifier['Many']]: [
|
|
37
|
+
Quantifier['Many'],
|
|
38
38
|
],
|
|
39
39
|
|
|
40
|
-
[
|
|
41
|
-
|
|
40
|
+
[Quantifier['All']]: [
|
|
41
|
+
Quantifier['All'],
|
|
42
42
|
],
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
export var QuantifierTitle = {
|
|
46
46
|
[Numerosity['Singular']]: {
|
|
47
47
|
[Gender['Masculine']]: {
|
|
48
|
-
[
|
|
49
|
-
[
|
|
50
|
-
[
|
|
51
|
-
[
|
|
52
|
-
[
|
|
48
|
+
[Quantifier['Any']]: 'Любой',
|
|
49
|
+
[Quantifier['None']]: 'Отсутствует',
|
|
50
|
+
[Quantifier['Single']]: 'Один',
|
|
51
|
+
[Quantifier['Many']]: 'Много',
|
|
52
|
+
[Quantifier['All']]: 'Все',
|
|
53
53
|
},
|
|
54
54
|
|
|
55
55
|
[Gender['Feminine']]: {
|
|
56
|
-
[
|
|
57
|
-
[
|
|
58
|
-
[
|
|
59
|
-
[
|
|
60
|
-
[
|
|
56
|
+
[Quantifier['Any']]: 'Любая',
|
|
57
|
+
[Quantifier['None']]: 'Отсутствует',
|
|
58
|
+
[Quantifier['Single']]: 'Одна',
|
|
59
|
+
[Quantifier['Many']]: 'Много',
|
|
60
|
+
[Quantifier['All']]: 'Все',
|
|
61
61
|
},
|
|
62
62
|
|
|
63
63
|
[Gender['Neuter']]: {
|
|
64
|
-
[
|
|
65
|
-
[
|
|
66
|
-
[
|
|
67
|
-
[
|
|
68
|
-
[
|
|
64
|
+
[Quantifier['Any']]: 'Любое',
|
|
65
|
+
[Quantifier['None']]: 'Отсутствует',
|
|
66
|
+
[Quantifier['Single']]: 'Одно',
|
|
67
|
+
[Quantifier['Many']]: 'Много',
|
|
68
|
+
[Quantifier['All']]: 'Все',
|
|
69
69
|
},
|
|
70
70
|
},
|
|
71
71
|
|
|
72
72
|
[Numerosity['Plural']]: {
|
|
73
73
|
[Gender['Indeterminate']]: {
|
|
74
|
-
[
|
|
75
|
-
[
|
|
76
|
-
[
|
|
77
|
-
[
|
|
78
|
-
[
|
|
74
|
+
[Quantifier['Any']]: 'Любые',
|
|
75
|
+
[Quantifier['None']]: 'Отсутствуют',
|
|
76
|
+
[Quantifier['Single']]: 'Один',
|
|
77
|
+
[Quantifier['Many']]: 'Много',
|
|
78
|
+
[Quantifier['All']]: 'Все',
|
|
79
79
|
},
|
|
80
80
|
},
|
|
81
81
|
}
|
|
@@ -96,9 +96,18 @@ export var inferQuantifier = value => {
|
|
|
96
96
|
return inferQuantifier(value?.quantifier)
|
|
97
97
|
|
|
98
98
|
case 'Array':
|
|
99
|
-
if (value
|
|
99
|
+
if (value.length === 1)
|
|
100
100
|
return Quantifier['Single']
|
|
101
|
-
else if (value
|
|
101
|
+
else if (value.length > 1)
|
|
102
|
+
return Quantifier['Many']
|
|
103
|
+
else
|
|
104
|
+
return Quantifier['None']
|
|
105
|
+
|
|
106
|
+
case 'Map':
|
|
107
|
+
case 'Set':
|
|
108
|
+
if (value.size === 1)
|
|
109
|
+
return Quantifier['Single']
|
|
110
|
+
else if (value.size > 1)
|
|
102
111
|
return Quantifier['Many']
|
|
103
112
|
else
|
|
104
113
|
return Quantifier['None']
|