theprogrammablemind_4wp 9.6.3-beta.1 → 9.6.3-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.
package/package.json CHANGED
@@ -73,6 +73,6 @@
73
73
  "scriptjs": "^2.5.9",
74
74
  "uuid": "^8.3.2"
75
75
  },
76
- "version": "9.6.3-beta.1",
76
+ "version": "9.6.3-beta.11",
77
77
  "license": "UNLICENSED"
78
78
  }
package/src/project.js CHANGED
@@ -23,6 +23,12 @@ const project = (object, filter) => {
23
23
  return object
24
24
  }
25
25
 
26
+ if (object.checks) {
27
+ for (const check in object.checks) {
28
+ filter.push(check)
29
+ }
30
+ }
31
+
26
32
  const projection = {}
27
33
  const set = (property, value) => {
28
34
  if (value === null || value === undefined) {
package/src/project2.js CHANGED
@@ -16,6 +16,7 @@ function project(source, filters, path=[]) {
16
16
  if (['boolean', 'string', 'number'].includes(typeof source)) {
17
17
  return source
18
18
  }
19
+
19
20
  if (Array.isArray(source)) {
20
21
  const result = []
21
22
  for (const value of source) {
@@ -45,6 +46,11 @@ function project(source, filters, path=[]) {
45
46
 
46
47
  // Get the properties to include from the apply function
47
48
  let properties = filter.apply(source);
49
+ if (source?.checks) {
50
+ for (const check of source.checks) {
51
+ properties.push(check)
52
+ }
53
+ }
48
54
 
49
55
  // update
50
56
  const updatedProperties = []