ekms 8.0.0-beta.76 → 8.0.0-beta.78
Sign up to get free protection for your applications and to get access to all the features.
- package/common/asking.instance.json +2 -0
- package/common/asking.js +253 -0
- package/common/asking.test.json +2290 -0
- package/common/comparable.instance.json +2 -2
- package/common/comparable.js +1 -1
- package/common/comparable.test.json +758 -0
- package/common/conjunction.instance.json +2 -0
- package/common/conjunction.js +104 -0
- package/common/conjunction.test.json +322 -0
- package/common/dialogues.js +17 -171
- package/common/dialogues.test.json +0 -786
- package/common/helpers.js +9 -2
- package/main.js +4 -0
- package/package.json +10 -2
package/common/helpers.js
CHANGED
@@ -33,8 +33,8 @@ const getCount = (context) => {
|
|
33
33
|
}
|
34
34
|
}
|
35
35
|
|
36
|
-
const words = (
|
37
|
-
return [{ word: pluralize.singular(
|
36
|
+
const words = (word, additional = {}) => {
|
37
|
+
return [{ word: pluralize.singular(word), number: 'one', ...additional }, { word: pluralize.plural(word), number: 'many', ...additional }]
|
38
38
|
}
|
39
39
|
|
40
40
|
const isMany = (context) => {
|
@@ -63,6 +63,12 @@ const isMany = (context) => {
|
|
63
63
|
return false
|
64
64
|
}
|
65
65
|
|
66
|
+
const requiredArgument = (value, name) => {
|
67
|
+
if (!value) {
|
68
|
+
throw new Error(`${name} is a required argument`)
|
69
|
+
}
|
70
|
+
}
|
71
|
+
|
66
72
|
const chooseNumber = (context, one, many) => {
|
67
73
|
if (isMany(context)) {
|
68
74
|
return many;
|
@@ -168,4 +174,5 @@ module.exports = {
|
|
168
174
|
words,
|
169
175
|
propertyToArray,
|
170
176
|
wordNumber,
|
177
|
+
requiredArgument,
|
171
178
|
}
|
package/main.js
CHANGED
@@ -9,6 +9,7 @@ const people = require('./common/people')
|
|
9
9
|
const time = require('./common/time')
|
10
10
|
const yesno = require('./common/yesno')
|
11
11
|
const negation = require('./common/negation')
|
12
|
+
const asking = require('./common/asking')
|
12
13
|
const avatar = require('./common/avatar')
|
13
14
|
const comparable = require('./common/comparable')
|
14
15
|
const concept = require('./common/concept')
|
@@ -23,6 +24,7 @@ const listener = require('./common/listener')
|
|
23
24
|
const tokenize = require('./common/tokenize')
|
24
25
|
const articles = require('./common/articles')
|
25
26
|
const nameable = require('./common/nameable')
|
27
|
+
const conjunction = require('./common/conjunction')
|
26
28
|
const dialogues = require('./common/dialogues')
|
27
29
|
const gdefaults = require('./common/gdefaults')
|
28
30
|
const meta = require('./common/meta')
|
@@ -64,6 +66,7 @@ module.exports = {
|
|
64
66
|
time,
|
65
67
|
yesno,
|
66
68
|
negation,
|
69
|
+
asking,
|
67
70
|
avatar,
|
68
71
|
comparable,
|
69
72
|
concept,
|
@@ -78,6 +81,7 @@ module.exports = {
|
|
78
81
|
tokenize,
|
79
82
|
articles,
|
80
83
|
nameable,
|
84
|
+
conjunction,
|
81
85
|
dialogues,
|
82
86
|
gdefaults,
|
83
87
|
meta,
|
package/package.json
CHANGED
@@ -30,6 +30,7 @@
|
|
30
30
|
"name": "General",
|
31
31
|
"description": "General purpose KM's",
|
32
32
|
"includes": [
|
33
|
+
"asking",
|
33
34
|
"avatar",
|
34
35
|
"comparable",
|
35
36
|
"concept",
|
@@ -56,6 +57,7 @@
|
|
56
57
|
"includes": [
|
57
58
|
"articles",
|
58
59
|
"nameable",
|
60
|
+
"conjunction",
|
59
61
|
"dialogues",
|
60
62
|
"gdefaults",
|
61
63
|
"meta",
|
@@ -135,6 +137,9 @@
|
|
135
137
|
"common/animals.test.json",
|
136
138
|
"common/articles.js",
|
137
139
|
"common/articles.test.json",
|
140
|
+
"common/asking.instance.json",
|
141
|
+
"common/asking.js",
|
142
|
+
"common/asking.test.json",
|
138
143
|
"common/avatar.js",
|
139
144
|
"common/avatar.test.json",
|
140
145
|
"common/characters.js",
|
@@ -148,6 +153,9 @@
|
|
148
153
|
"common/concept.instance.json",
|
149
154
|
"common/concept.js",
|
150
155
|
"common/concept.test.json",
|
156
|
+
"common/conjunction.instance.json",
|
157
|
+
"common/conjunction.js",
|
158
|
+
"common/conjunction.test.json",
|
151
159
|
"common/countable.js",
|
152
160
|
"common/countable.test.json",
|
153
161
|
"common/crew.instance.json",
|
@@ -295,8 +303,8 @@
|
|
295
303
|
"table": "^6.7.1",
|
296
304
|
"base-64": "^1.0.0",
|
297
305
|
"argparse": "^2.0.1",
|
298
|
-
"theprogrammablemind": "8.0.0-beta.
|
306
|
+
"theprogrammablemind": "8.0.0-beta.78"
|
299
307
|
},
|
300
|
-
"version": "8.0.0-beta.
|
308
|
+
"version": "8.0.0-beta.78",
|
301
309
|
"license": "UNLICENSED"
|
302
310
|
}
|