Comparing version 3.0.2 to 3.0.4
@@ -221,3 +221,3 @@ /** | ||
// Don't tolerate non-objects, or arrays, or regexps, or dates. | ||
if (!_.isObject(v) || _.isArray(v) || _.isDate(v) || _.isRegExp(v) || _.isError(v)) { | ||
if (!_.isObject(v) || _.isArray(v) || _.isDate(v) || _.isRegExp(v) || _.isError(v) || _.isFunction(v)) { | ||
throw new Error('E_runtimeInputTypeCoercionError'); | ||
@@ -236,4 +236,6 @@ } | ||
// If that doesn't work, give up | ||
throw new Error('E_runtimeInputTypeCoercionError'); | ||
// Also tolerate "pretty close" objects-- i.e. things which might have prototypal properties | ||
// and/or some weird getters and setters and stuff. | ||
return v; | ||
}, | ||
@@ -240,0 +242,0 @@ getBase: function (){ |
@@ -335,6 +335,3 @@ /** | ||
} | ||
else if (_.isArray(value)) { | ||
} | ||
if (!replacer) { | ||
@@ -341,0 +338,0 @@ return value; |
{ | ||
"name": "rttc", | ||
"version": "3.0.2", | ||
"version": "3.0.4", | ||
"description": "Runtime type-checking for JavaScript.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
101869
2102