Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

rttc

Package Overview
Dependencies
Maintainers
4
Versions
108
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rttc - npm Package Compare versions

Comparing version 3.1.2 to 3.1.3

8

lib/helpers/sanitize.js

@@ -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:

16

lib/helpers/validate-recursive.js

@@ -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;

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc