Comparing version 3.1.2 to 3.1.3
@@ -134,2 +134,10 @@ /** | ||
} | ||
else if (_.isObject(value)){ | ||
if (value instanceof Readable) { | ||
return null; | ||
} | ||
if (value instanceof Buffer) { | ||
return null; | ||
} | ||
} | ||
@@ -136,0 +144,0 @@ // Coerce NaN, Infinity, and -Infinity to 0: |
@@ -31,14 +31,2 @@ /** | ||
// console.log('\n'); | ||
// console.log('expecting:',expected); | ||
// console.log('actual:',require('util').inspect(actual, false, null), require('util').format('(a %s)', getDisplayType(actual))); | ||
function getDisplayType(x){ | ||
var displayType; | ||
displayType = typeof x; | ||
try { | ||
displayType = x.constructor.name; | ||
} | ||
catch (e){} | ||
return displayType; | ||
} | ||
@@ -77,3 +65,3 @@ // console.log('validating',actual,'against',expected,'...'); | ||
if (_.isArray(expected)) { | ||
expectedType = types.arr; | ||
expectedType = types.array; | ||
isExpectingArray = true; | ||
@@ -83,3 +71,3 @@ } | ||
else if (_.isObject(expected)) { | ||
expectedType = types.obj; | ||
expectedType = types.dictionary; | ||
isExpectingDictionary = true; | ||
@@ -86,0 +74,0 @@ } |
{ | ||
"name": "rttc", | ||
"version": "3.1.2", | ||
"version": "3.1.3", | ||
"description": "Runtime type-checking for JavaScript.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -53,2 +53,5 @@ /** | ||
} | ||
else if (_.isObject(_val) && _val instanceof require('stream').Readable) { | ||
return _val; | ||
} | ||
// Otherwise allow vanilla _.cloneDeep() behavior: | ||
@@ -55,0 +58,0 @@ else return undefined; |
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
121696
2512