tpmkms_4wp 8.9.0-beta.19 → 8.9.0-beta.2

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.
Files changed (40) hide show
  1. package/common/animals.instance.json +0 -65
  2. package/common/articles.js +0 -4
  3. package/common/colors.instance.json +0 -71
  4. package/common/comparable.instance.json +0 -15
  5. package/common/conjunction.js +18 -27
  6. package/common/countable.js +2 -8
  7. package/common/countable.test.json +0 -586
  8. package/common/crew.instance.json +176 -130
  9. package/common/dialogues.js +11 -7
  10. package/common/dimension.instance.json +0 -10
  11. package/common/edible.instance.json +0 -376
  12. package/common/emotions.instance.json +0 -8
  13. package/common/fastfood.instance.json +924 -1437
  14. package/common/formulas.instance.json +0 -10
  15. package/common/helpers/dialogues.js +8 -14
  16. package/common/helpers/properties.js +2 -2
  17. package/common/helpers.js +0 -29
  18. package/common/hierarchy.js +5 -5
  19. package/common/hierarchy.test.json +0 -1491
  20. package/common/kirk.instance.json +0 -5
  21. package/common/length.instance.json +0 -150
  22. package/common/math.instance.json +0 -10
  23. package/common/meta.js +3 -5
  24. package/common/ordering.instance.json +0 -10
  25. package/common/people.instance.json +4 -169
  26. package/common/pipboy.instance.json +28 -198
  27. package/common/pokemon.instance.json +0 -65
  28. package/common/pressure.instance.json +0 -40
  29. package/common/properties.instance.json +0 -5
  30. package/common/reports.instance.json +1 -21
  31. package/common/spock.instance.json +0 -5
  32. package/common/temperature.instance.json +0 -40
  33. package/common/ui.instance.json +0 -10
  34. package/common/ui.js +1 -0
  35. package/common/weight.instance.json +0 -120
  36. package/common/wp.instance.json +954 -28870
  37. package/common/wp.js +10 -147
  38. package/common/wp.test.json +698 -28243
  39. package/package.json +2 -3
  40. package/common/helpers/conjunction.js +0 -75
package/package.json CHANGED
@@ -196,7 +196,6 @@
196
196
  "common/help.test.json",
197
197
  "common/helpers.js",
198
198
  "common/helpers/concept.js",
199
- "common/helpers/conjunction.js",
200
199
  "common/helpers/dialogues.js",
201
200
  "common/helpers/formulas.js",
202
201
  "common/helpers/frankenhash.js",
@@ -315,8 +314,8 @@
315
314
  "table": "^6.7.1",
316
315
  "base-64": "^1.0.0",
317
316
  "argparse": "^2.0.1",
318
- "theprogrammablemind_4wp": "8.9.0-beta.19"
317
+ "theprogrammablemind_4wp": "8.9.0-beta.2"
319
318
  },
320
- "version": "8.9.0-beta.19",
319
+ "version": "8.9.0-beta.2",
321
320
  "license": "UNLICENSED"
322
321
  }
@@ -1,75 +0,0 @@
1
- const { propertyToArray } = require('../helpers.js')
2
-
3
- const asList = (context) => {
4
- if (context.marker === 'list') {
5
- return context
6
- }
7
- return {
8
- marker: 'list',
9
- types: [context.marker],
10
- value: [context]
11
- }
12
- }
13
-
14
- const listable = (hierarchy) => (c, type) => {
15
- if (!c) {
16
- return false
17
- }
18
- if (hierarchy.isA(c.marker, type)) {
19
- return true
20
- }
21
- if (c.marker === 'list') {
22
- for (const t of c.types) {
23
- if (hierarchy.isA(t, type)) {
24
- return true
25
- }
26
- }
27
- }
28
- return false
29
- }
30
-
31
- const isA = (hierarchy) => (child, parent, { strict=false } = {}) => {
32
- if (!child || !parent) {
33
- return false
34
- }
35
-
36
- if (strict) {
37
- if (child.marker) {
38
- child = child.marker
39
- }
40
- if (parent.marker) {
41
- parent = parent.marker
42
- }
43
- return hierarchy.isA(child, parent)
44
- } else {
45
- const children = propertyToArray(child)
46
- for (let child of children) {
47
- let okay = false
48
- if (hierarchy.isA(child.marker || child, parent.marker || parent)) {
49
- okay = true
50
- } else {
51
- for (const childT of child.types || [child]) {
52
- if (okay) {
53
- break
54
- }
55
- for (const parentT of parent.types || [parent]) {
56
- if (hierarchy.isA(childT, parentT)) {
57
- okay = true
58
- break
59
- }
60
- }
61
- }
62
- }
63
- if (!okay) {
64
- return false
65
- }
66
- }
67
- return true
68
- }
69
- }
70
-
71
- module.exports = {
72
- asList,
73
- isA,
74
- listable,
75
- }