Comparing version 0.4.3 to 0.4.4
@@ -40,2 +40,5 @@ var __is, _is, allTrue, allTypes, getChecker, getKey, getRequired, getTypeError, getTypeNames, isValid, iterate, normalize, realKey, toStr; | ||
v = schema[k]; | ||
if (k === "__strict") { | ||
continue; | ||
} | ||
if (v.type) { | ||
@@ -150,3 +153,3 @@ v.types = types = v.type; | ||
return new Promise((resolve, reject) => { | ||
var addProblem, keys, problems, required, walk; | ||
var addProblem, keys, problems, required, strict, walk; | ||
if (!isNormalized) { | ||
@@ -195,5 +198,9 @@ normalize(schema); | ||
}; | ||
strict = schema.__strict; | ||
if (strict == null) { | ||
strict = true; | ||
} | ||
walk(obj, "", { | ||
_types: [_is.object], | ||
strict: true | ||
strict: strict | ||
}); | ||
@@ -278,2 +285,3 @@ iterate(required, (k) => { | ||
normalize(schema); | ||
delete schema.__strict; | ||
keys = Object.keys(schema); | ||
@@ -280,0 +288,0 @@ if (keys.length < 5) { |
{ | ||
"name": "read-conf", | ||
"description": "reads a config file", | ||
"version": "0.4.3", | ||
"version": "0.4.4", | ||
"homepage": "https://github.com/paulpflug/", | ||
@@ -37,4 +37,4 @@ "author": { | ||
"coffee-loader": "^0.9.0", | ||
"coffeescript": "^2.3.0", | ||
"snapy": "^0.1.1" | ||
"coffeescript": "^2.3.1", | ||
"snapy": "^0.1.3" | ||
}, | ||
@@ -41,0 +41,0 @@ "keywords": [ |
28420
792