ezobjects
Advanced tools
Comparing version 2.1.0 to 2.1.1
const docket = require('docket-parser'); | ||
docket.title(`EZ Objects v2.1.0`); | ||
docket.title(`EZ Objects v2.1.1`); | ||
docket.linkClass('text-success'); | ||
docket.parseFiles(['index.js', 'mysql-connection.js']); | ||
docket.generateDocs('docs'); |
21
index.js
@@ -545,7 +545,18 @@ const mysqlConnection = require('./mysql-connection'); | ||
else if ( typeof arg1 == 'object' && ( arg1.constructor.name == 'RowDataPacket' || arg1.constructor.name == 'Array' ) ) { | ||
/** Loop through each property */ | ||
Object.keys(arg1).forEach((key) => { | ||
/** Append property in object */ | ||
this[key](arg1[key]); | ||
}); | ||
/** Create helper method for recursively loading property values into object */ | ||
const loadProperties = (obj) => { | ||
/** If this object extends another, recursively add extended property values into objecct */ | ||
if ( obj.extendsConfig ) | ||
loadProperties(obj.extendsConfig); | ||
/** Loop through each property */ | ||
obj.properties.forEach((property) => { | ||
/** Append property in object */ | ||
if ( typeof arg1[property.name] !== 'undefined' ) | ||
this[property.name](property.loadTransform(arg1[property.name])); | ||
}); | ||
}; | ||
/** Store loaded record properties into object */ | ||
loadProperties(obj); | ||
} | ||
@@ -552,0 +563,0 @@ |
{ | ||
"name": "ezobjects", | ||
"version": "2.1.0", | ||
"version": "2.1.1", | ||
"description": "Easy dynamic object generation with strict typing and set chaining", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -1,2 +0,2 @@ | ||
# EZ Objects v2.1.0 | ||
# EZ Objects v2.1.1 | ||
@@ -3,0 +3,0 @@ EZ Objects is a Node.js module (that can also be usefully browserify'd) that aims to save you lots of time |
Sorry, the diff of this file is not supported yet
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
372999
2122