schemastery
Advanced tools
Comparing version 2.1.1 to 2.1.2
@@ -264,2 +264,7 @@ var __defProp = Object.defineProperty; | ||
}); | ||
if (name === "object" || name === "dict") { | ||
schema.meta.default = {}; | ||
} else if (name === "array" || name === "tuple") { | ||
schema.meta.default = []; | ||
} | ||
return schema; | ||
@@ -266,0 +271,0 @@ } |
{ | ||
"name": "schemastery", | ||
"description": "type driven schema validator", | ||
"version": "2.1.1", | ||
"version": "2.1.2", | ||
"main": "index.js", | ||
@@ -6,0 +6,0 @@ "typings": "lib/index.d.ts", |
@@ -136,3 +136,3 @@ # Schemastery | ||
Assert that the value is an array of `inner`. | ||
Assert that the value is an array of `inner`. The default value will be `[]` if not specified. | ||
@@ -150,3 +150,3 @@ ```js | ||
Assert that the value is a dictionary of `inner`. | ||
Assert that the value is a dictionary of `inner`. The default value will be `{}` if not specified. | ||
@@ -164,3 +164,3 @@ ```js | ||
Assert that the value is a tuple whose each element is of corresponding subtype. | ||
Assert that the value is a tuple whose each element is of corresponding subtype. The default value will be `[]` if not specified. | ||
@@ -181,3 +181,3 @@ ```js | ||
Assert that the value is an object whose each property is of corresponding subtype. | ||
Assert that the value is an object whose each property is of corresponding subtype. The default value will be `{}` if not specified. | ||
@@ -184,0 +184,0 @@ ```js |
Sorry, the diff of this file is not supported yet
46214
386