ezobjects
Advanced tools
Comparing version 0.6.1 to 0.6.2
@@ -11,2 +11,7 @@ const ezobjects = require('./index'); | ||
/** Example of the object newly instansiated */ | ||
const a = new DatabaseRecord(); | ||
console.log(a); | ||
/** Create another customized object that extends the first one */ | ||
@@ -26,8 +31,8 @@ ezobjects({ | ||
/** Example of the extended object newly instansiated */ | ||
const a = new Person(); | ||
const b = new Person(); | ||
console.log(a); | ||
console.log(b); | ||
/** Example of the extended object instansiated and initialized using object passed to constructor */ | ||
const b = new Person({ | ||
const c = new Person({ | ||
id: 1, | ||
@@ -41,6 +46,6 @@ firstName: 'Rich', | ||
console.log(b); | ||
console.log(c); | ||
/** Example of the extended object instansiated, then loaded with data using setter methods */ | ||
const c = new Person(); | ||
const d = new Person(); | ||
@@ -54,3 +59,3 @@ c.id(2); | ||
console.log(c); | ||
console.log(d); | ||
@@ -79,5 +84,5 @@ /** Example of the extended object's properties being accessed using getter methods */ | ||
const d = new DatabaseRecord(); | ||
const e = new DatabaseRecord(); | ||
console.log(d); | ||
console.log(e); | ||
@@ -103,4 +108,4 @@ /** These objects can be extended */ | ||
const e = new DatabaseRecord2(); | ||
const f = new DatabaseRecord2(); | ||
console.log(e); | ||
console.log(f); |
{ | ||
"name": "ezobjects", | ||
"version": "0.6.1", | ||
"version": "0.6.2", | ||
"description": "Easy dynamic object generation with strict typing and set chaining", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -1,2 +0,2 @@ | ||
# EZ Objects v0.6.1 | ||
# EZ Objects v0.6.2 | ||
@@ -40,6 +40,3 @@ Under development, but completely useable. | ||
/** | ||
* Create a customized object on the global (node) or window (browser) namespace, complete with | ||
* constructor/init/getters/setters with strict type checking, TypeError thrown if invalid type. | ||
*/ | ||
/** Create a customized object on the global (node) or window (browser) namespace, complete with constructor/init/getters/setters */ | ||
ezobjects({ | ||
@@ -52,2 +49,7 @@ name: 'DatabaseRecord', | ||
/** Example of the object newly instansiated */ | ||
const a = new DatabaseRecord(); | ||
console.log(a); | ||
/** Create another customized object that extends the first one */ | ||
@@ -67,8 +69,8 @@ ezobjects({ | ||
/** Example of the extended object newly instansiated */ | ||
const a = new Person(); | ||
const b = new Person(); | ||
console.log(a); | ||
console.log(b); | ||
/** Example of the extended object instansiated and initialized using object passed to constructor */ | ||
const b = new Person({ | ||
const c = new Person({ | ||
id: 1, | ||
@@ -82,6 +84,6 @@ firstName: 'Rich', | ||
console.log(b); | ||
console.log(c); | ||
/** Example of the extended object instansiated, then loaded with data using setter methods */ | ||
const c = new Person(); | ||
const d = new Person(); | ||
@@ -95,3 +97,3 @@ c.id(2); | ||
console.log(c); | ||
console.log(d); | ||
@@ -120,5 +122,5 @@ /** Example of the extended object's properties being accessed using getter methods */ | ||
const d = new DatabaseRecord(); | ||
const e = new DatabaseRecord(); | ||
console.log(d); | ||
console.log(e); | ||
@@ -144,5 +146,5 @@ /** These objects can be extended */ | ||
const e = new DatabaseRecord2(); | ||
const f = new DatabaseRecord2(); | ||
console.log(e); | ||
console.log(f); | ||
``` | ||
@@ -153,2 +155,3 @@ | ||
``` | ||
DatabaseRecord { _id: 0 } | ||
Person { | ||
@@ -169,8 +172,8 @@ _id: 0, | ||
Person { | ||
_id: 2, | ||
_firstName: 'Bert', | ||
_lastName: 'Reynolds', | ||
_checkingBalance: 91425518.32, | ||
_permissions: [ 1, 4 ], | ||
_favoriteDay: 2017-06-01T05:00:00.000Z } | ||
_id: 0, | ||
_firstName: '', | ||
_lastName: '', | ||
_checkingBalance: 0, | ||
_permissions: [], | ||
_favoriteDay: null } | ||
ID: 2 | ||
@@ -177,0 +180,0 @@ First Name: Bert |
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
14101
228
179