quanstructor
Advanced tools
Comparing version 0.4.3 to 0.4.4
{ | ||
"name": "quanstructor", | ||
"version": "0.4.3", | ||
"version": "0.4.4", | ||
"description": "Exceptionally powerful object model builder for complex architectures", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -242,4 +242,13 @@ let { defined } = require('./lib/Statics') | ||
let value = this.specs[attrib].convert ? await this.specs[attrib].convert( obj[ attrib ] ) : obj[ attrib ] | ||
if ( this.specs[ attrib ]._allowNull || defined(value) ) | ||
ref[ attrib ] = value | ||
if ( this.specs[ attrib ].Quanstructor ) { | ||
ref[ attrib ] = _.isArray( value ) | ||
? await Promise.all( | ||
value.map( (element) => { return QUANSTRUCTORS[ this.specs[ attrib ].Quanstructor ].viewAs( element, projection, options ) } ) | ||
) : await QUANSTRUCTORS[ this.specs[ attrib ].Quanstructor ].viewAs( value, projection, options ) | ||
} | ||
else { | ||
if ( this.specs[ attrib ]._allowNull || defined(value) ) | ||
ref[ attrib ] = value | ||
} | ||
} | ||
@@ -250,4 +259,5 @@ } | ||
for ( let sup of this._derivations ) | ||
if ( DEFINITIONS[ sup ] && DEFINITIONS[ sup ]._reform ) | ||
if ( DEFINITIONS[ sup ] && DEFINITIONS[ sup ]._reform ) { | ||
await DEFINITIONS[ sup ]._reform( res, projection, options ) | ||
} | ||
if ( this.specs._reform ) await this.specs._reform( res, projection, options ) | ||
@@ -254,0 +264,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
19226
523