theprogrammablemind 9.7.1-beta.21 → 9.7.1-beta.23
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 +1 -1
- package/src/project2.js +4 -0
package/package.json
CHANGED
package/src/project2.js
CHANGED
|
@@ -101,6 +101,10 @@ function project(source, filters, path=[]) {
|
|
|
101
101
|
} else if (prop.property && source.hasOwnProperty(prop.property)) {
|
|
102
102
|
// If the property is an object and not null, recursively project it
|
|
103
103
|
if (typeof source[prop.property] === 'object' && source[prop.property] !== null) {
|
|
104
|
+
if (prop.all) {
|
|
105
|
+
result[prop.property] = source[prop.property]
|
|
106
|
+
return
|
|
107
|
+
}
|
|
104
108
|
result[prop.property] = {}
|
|
105
109
|
const instantiatedCheck = []
|
|
106
110
|
for (const check of prop.check) {
|