tpmkms_4wp 8.9.0-beta.10 → 8.9.0-beta.11

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.
@@ -24323,6 +24323,7 @@
24323
24323
  "default": true,
24324
24324
  "text": "resetidsuffix",
24325
24325
  "word": "resetidsuffix",
24326
+ "raw_text": "resetIdSuffix",
24326
24327
  "range": {
24327
24328
  "start": 0,
24328
24329
  "end": 12
@@ -1,7 +1,8 @@
1
1
  const { knowledgeModule, where } = require('./runtime').theprogrammablemind
2
2
  const gdefaults = require('./gdefaults.js')
3
3
  const conjunction_tests = require('./conjunction.test.json')
4
- const { defaultContextCheck } = require('./helpers')
4
+ const { defaultContextCheck, propertyToArray } = require('./helpers')
5
+ const { isA, asList, listable } = require('./helpers/conjunction.js')
5
6
 
6
7
  let config = {
7
8
  name: 'conjunction',
@@ -64,24 +65,32 @@ let config = {
64
65
  };
65
66
 
66
67
  const initializer = ({objects, config, isModule}) => {
67
- config.addArgs(({config, api, isA}) => ({
68
- isAListable: (context, type) => {
69
- if (context.marker == 'list' || context.listable) {
70
- return context.value.every( (element) => isA(element.marker, type) )
71
- } else {
72
- return isA(context.marker, type)
73
- }
74
- },
75
- toContext: (v) => {
76
- if (Array.isArray(v)) {
77
- return { marker: 'list', level: 1, value: v }
78
- }
79
- if (v.marker == 'list') {
68
+ config.addArgs(({config, api, hierarchy}) => {
69
+ const isAI = isA(hierarchy);
70
+
71
+ return {
72
+ isAListable: (context, type) => {
73
+ if (context.marker == 'list' || context.listable) {
74
+ return context.value.every( (element) => isAI(element.marker, type) )
75
+ } else {
76
+ return isAI(context.marker, type)
77
+ }
78
+ },
79
+ asList,
80
+ toArray: propertyToArray,
81
+ listable: listable(hierarchy),
82
+ isA: isAI,
83
+ toContext: (v) => {
84
+ if (Array.isArray(v)) {
85
+ return { marker: 'list', level: 1, value: v }
86
+ }
87
+ if (v.marker == 'list') {
88
+ return v
89
+ }
80
90
  return v
81
- }
82
- return v
83
- },
84
- }))
91
+ },
92
+ }
93
+ })
85
94
  }
86
95
 
87
96
  knowledgeModule( {
@@ -24134,24 +24134,6 @@
24134
24134
  1
24135
24135
  ]
24136
24136
  ],
24137
- [
24138
- [
24139
- "is",
24140
- 0
24141
- ],
24142
- [
24143
- "propertyOf",
24144
- 0
24145
- ],
24146
- [
24147
- "the",
24148
- 0
24149
- ],
24150
- [
24151
- "unknown",
24152
- 1
24153
- ]
24154
- ],
24155
24137
  [
24156
24138
  [
24157
24139
  "is",
@@ -27478,24 +27460,6 @@
27478
27460
  1
27479
27461
  ]
27480
27462
  ],
27481
- [
27482
- [
27483
- "is",
27484
- 0
27485
- ],
27486
- [
27487
- "propertyOf",
27488
- 0
27489
- ],
27490
- [
27491
- "the",
27492
- 0
27493
- ],
27494
- [
27495
- "unknown",
27496
- 1
27497
- ]
27498
- ],
27499
27463
  [
27500
27464
  [
27501
27465
  "is",
@@ -37545,32 +37509,6 @@
37545
37509
  1
37546
37510
  ]
37547
37511
  ],
37548
- [
37549
- [
37550
- "arm",
37551
- 0
37552
- ],
37553
- [
37554
- "is",
37555
- 0
37556
- ],
37557
- [
37558
- "means",
37559
- 0
37560
- ],
37561
- [
37562
- "propertyOf",
37563
- 0
37564
- ],
37565
- [
37566
- "the",
37567
- 0
37568
- ],
37569
- [
37570
- "unknown",
37571
- 1
37572
- ]
37573
- ],
37574
37512
  [
37575
37513
  [
37576
37514
  "arm",
@@ -39837,32 +39775,6 @@
39837
39775
  1
39838
39776
  ]
39839
39777
  ],
39840
- [
39841
- [
39842
- "disarm",
39843
- 0
39844
- ],
39845
- [
39846
- "means",
39847
- 0
39848
- ],
39849
- [
39850
- "not",
39851
- 0
39852
- ],
39853
- [
39854
- "propertyOf",
39855
- 0
39856
- ],
39857
- [
39858
- "the",
39859
- 0
39860
- ],
39861
- [
39862
- "unknown",
39863
- 1
39864
- ]
39865
- ],
39866
39778
  [
39867
39779
  [
39868
39780
  "disarm",
@@ -40340,32 +40252,6 @@
40340
40252
  1
40341
40253
  ]
40342
40254
  ],
40343
- [
40344
- [
40345
- "arm",
40346
- 0
40347
- ],
40348
- [
40349
- "is",
40350
- 0
40351
- ],
40352
- [
40353
- "means",
40354
- 0
40355
- ],
40356
- [
40357
- "propertyOf",
40358
- 0
40359
- ],
40360
- [
40361
- "the",
40362
- 0
40363
- ],
40364
- [
40365
- "unknown",
40366
- 1
40367
- ]
40368
- ],
40369
40255
  [
40370
40256
  [
40371
40257
  "arm",
@@ -40470,32 +40356,6 @@
40470
40356
  1
40471
40357
  ]
40472
40358
  ],
40473
- [
40474
- [
40475
- "disarm",
40476
- 0
40477
- ],
40478
- [
40479
- "means",
40480
- 0
40481
- ],
40482
- [
40483
- "not",
40484
- 0
40485
- ],
40486
- [
40487
- "propertyOf",
40488
- 0
40489
- ],
40490
- [
40491
- "the",
40492
- 0
40493
- ],
40494
- [
40495
- "unknown",
40496
- 1
40497
- ]
40498
- ],
40499
40359
  [
40500
40360
  [
40501
40361
  "disarm",
@@ -41370,42 +41230,6 @@
41370
41230
  1
41371
41231
  ]
41372
41232
  ],
41373
- [
41374
- [
41375
- "is",
41376
- 0
41377
- ],
41378
- [
41379
- "propertyOf",
41380
- 0
41381
- ],
41382
- [
41383
- "the",
41384
- 0
41385
- ],
41386
- [
41387
- "unknown",
41388
- 1
41389
- ]
41390
- ],
41391
- [
41392
- [
41393
- "is",
41394
- 0
41395
- ],
41396
- [
41397
- "propertyOf",
41398
- 0
41399
- ],
41400
- [
41401
- "the",
41402
- 0
41403
- ],
41404
- [
41405
- "unknown",
41406
- 1
41407
- ]
41408
- ],
41409
41233
  [
41410
41234
  [
41411
41235
  "is",
@@ -281,6 +281,11 @@
281
281
  "verb",
282
282
  false
283
283
  ],
284
+ [
285
+ "every",
286
+ "quantifier",
287
+ false
288
+ ],
284
289
  [
285
290
  "expression",
286
291
  "expression",