typeof-arguments
Advanced tools
Comparing version 3.1.0 to 3.1.1
12
index.js
@@ -10,3 +10,3 @@ /* global Function */ | ||
validateArguments(getArgumentsObject,getExpectedArray); | ||
for(let item in getExpectedArray){ | ||
Object.keys(getExpectedArray).forEach((item)=>{ | ||
if(!ofType(getArgumentsObject[item],getExpectedArray[item])){ | ||
@@ -24,3 +24,3 @@ var actual = getActualType(getArgumentsObject[item]); | ||
} | ||
} | ||
}); | ||
return true; | ||
@@ -53,4 +53,4 @@ }; | ||
var types = [whenString,whenRegExp,whenObject,whenArray]; | ||
for(var i in types){ | ||
var check = types[i](expectedType); | ||
for(var type of types){ | ||
var check = type(expectedType); | ||
if(check) return check; | ||
@@ -98,4 +98,4 @@ } | ||
var types = {}; | ||
for(var i in arrayTypes){ | ||
var exp = whenObject(arrayTypes[i]); | ||
for(var type of arrayTypes){ | ||
var exp = whenObject(type); | ||
if(ofType(exp,null)) return null; | ||
@@ -102,0 +102,0 @@ types[exp.expected] = exp.expected; |
{ | ||
"name": "typeof-arguments", | ||
"version": "3.1.0", | ||
"version": "3.1.1", | ||
"description": "Validate the types of arguments passed to the function.", | ||
@@ -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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
0
30423
11