Comparing version 0.2.3 to 0.2.4
@@ -8,4 +8,4 @@ /** | ||
// only used by legacy methods | ||
/** | ||
@@ -12,0 +12,0 @@ * Run-time type checking. Given a set of typed inputs, ensure the run-time configured |
@@ -9,4 +9,4 @@ /** | ||
// only used by legacy methods | ||
/** | ||
@@ -13,0 +13,0 @@ * Given a type and primitive value, check that it matches. |
@@ -56,7 +56,7 @@ /** | ||
// Check `actual` value against expectedType | ||
if (!expectedType.is(actual)){ | ||
if (!expectedType.is(coercedValue)){ | ||
// Invalid expected type. Try to coerce: | ||
try { | ||
coercedValue = expectedType.to(actual); | ||
coercedValue = expectedType.to(coercedValue); | ||
} | ||
@@ -63,0 +63,0 @@ catch (e) { |
{ | ||
"name": "rttc", | ||
"version": "0.2.3", | ||
"version": "0.2.4", | ||
"description": "Runtime type-checking for JavaScript.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -252,3 +252,3 @@ # rttc | ||
The usage of this module is changing, but backwards compatibility will be maintained up until the first major version bump (v1.0.0). | ||
The usage of this module has been extended considerably, but backwards compatibility will be maintained up until the first major version bump (v1.0.0). | ||
See tests for more details. | ||
@@ -255,0 +255,0 @@ |
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
72566
26
2082