ezobjects
Advanced tools
Comparing version 5.1.0 to 5.1.1
const docket = require(`docket-parser`); | ||
docket.title(`EZ Objects v5.1.0`); | ||
docket.title(`EZ Objects v5.1.1`); | ||
docket.linkClass(`text-success`); | ||
docket.parseFiles([`index.js`]); | ||
docket.generateDocs(`docs`); |
16
index.js
@@ -444,12 +444,12 @@ /** | ||
/** If type is 'ARRAY' with no 'arrayOf', throw error */ | ||
if ( property.type == 'array' && ( typeof property.arrayOf !== 'object' || property.arrayOf.constructor.name != 'Object' ) ) | ||
throw new Error(`ezobjects.validatePropertyConfig(): Property '${property.name}' of type ${property.type} with missing or invalid 'arrayOf'.`); | ||
/** If type is 'ARRAY' with 'arrayOf' containing bad or missing type, throw error */ | ||
if ( property.type == 'array' && typeof property.arrayOf.type != 'string' && typeof property.arrayOf.instanceOf != 'string' ) | ||
throw new Error(`ezobjects.validatePropertyConfig(): Property '${property.name}' of type ${property.type} with missing or invalid 'arrayOf.type' and/or 'arrayOf.instanceOf', one of them is required.`); | ||
/** Attach arrayOf 'ezobjectType' if property type is 'array' */ | ||
if ( property.type == 'array' ) { | ||
/** If type is 'ARRAY' with no 'arrayOf', throw error */ | ||
if ( typeof property.arrayOf !== 'object' || property.arrayOf.constructor.name != 'Object' ) | ||
throw new Error(`ezobjects.validatePropertyConfig(): Property '${property.name}' of type ${property.type} with missing or invalid 'arrayOf'.`); | ||
/** If type is 'ARRAY' with 'arrayOf' containing bad or missing type, throw error */ | ||
if ( typeof property.arrayOf.type != 'string' && typeof property.arrayOf.instanceOf != 'string' ) | ||
throw new Error(`ezobjects.validatePropertyConfig(): Property '${property.name}' of type ${property.type} with missing or invalid 'arrayOf.type' and/or 'arrayOf.instanceOf', one of them is required.`); | ||
/** If it's a standard EZ Object type, attach 'ezobjectType' to property for later use */ | ||
@@ -456,0 +456,0 @@ property.ezobjectType = ezobjectTypes.find(x => x.type == property.type && x.arrayOfType == property.arrayOf.type ); |
{ | ||
"name": "ezobjects", | ||
"version": "5.1.0", | ||
"version": "5.1.1", | ||
"description": "Easy Auto-Generated Strictly-Typed JavaScript Class Objects", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -1,2 +0,2 @@ | ||
# EZ Objects v5.1.0 | ||
# EZ Objects v5.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
353004