Comparing version 4.0.0 to 4.0.1
@@ -28,3 +28,3 @@ /** | ||
} | ||
if (unsafeMode && !_.isUndefined(typeSchema)) { | ||
if (unsafeMode && _.isUndefined(typeSchema)) { | ||
throw new Error('rttc.decode() cannot enable `unsafeMode` without also providing a `typeSchema`.'); | ||
@@ -31,0 +31,0 @@ } |
@@ -19,2 +19,8 @@ /** | ||
// Never allows `undefined` at the top level (or inside- but that check is below in stringifySafe) | ||
if (_.isUndefined(val)) { | ||
if (allowNull) return null; | ||
else return undefined; | ||
} | ||
// First, prevent against endless circular recursion: | ||
@@ -21,0 +27,0 @@ // (this should never throw, but if it does, it needs to be handled |
{ | ||
"name": "rttc", | ||
"version": "4.0.0", | ||
"version": "4.0.1", | ||
"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
133378
2652
49376