schema-llama
Advanced tools
Comparing version 0.0.7 to 0.0.8
@@ -62,11 +62,11 @@ 'use strict'; | ||
// Object.defineProperty(this, 'valueOf', { | ||
// enumerable: false, | ||
// configurable: false, | ||
// value: toJSON | ||
// }); | ||
Object.defineProperty(this, 'valueOf', { | ||
enumerable: false, | ||
configurable: true, | ||
value: toJSON | ||
}); | ||
Object.defineProperty(this, 'toJSON', { | ||
enumerable: false, | ||
configurable: false, | ||
configurable: true, | ||
value: toJSON | ||
@@ -153,3 +153,3 @@ }); | ||
if (!Primitive && !schemaItem.prototype && value.constructor !== schemaItem) { | ||
value = schemaItem(value); | ||
value = schemaItem(value, key); | ||
} | ||
@@ -156,0 +156,0 @@ if (!Primitive && schemaItem.prototype && value.constructor !== schemaItem) { |
{ | ||
"name": "schema-llama", | ||
"version": "0.0.7", | ||
"version": "0.0.8", | ||
"description": "A more purely javascript es6 class generator. Takes the work out of validation, type checking, and more.", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index.js", |
@@ -55,11 +55,11 @@ import { TypeError, ValidationError, Error } from './errors'; | ||
// Object.defineProperty(this, 'valueOf', { | ||
// enumerable: false, | ||
// configurable: false, | ||
// value: toJSON | ||
// }); | ||
Object.defineProperty(this, 'valueOf', { | ||
enumerable: false, | ||
configurable: true, | ||
value: toJSON | ||
}); | ||
Object.defineProperty(this, 'toJSON', { | ||
enumerable: false, | ||
configurable: false, | ||
configurable: true, | ||
value: toJSON | ||
@@ -139,3 +139,3 @@ }); | ||
if(!Primitive && !schemaItem.prototype && value.constructor !== schemaItem) { | ||
value = schemaItem(value); | ||
value = schemaItem(value, key); | ||
} | ||
@@ -142,0 +142,0 @@ if(!Primitive && schemaItem.prototype && value.constructor !== schemaItem) { |
25679