Comparing version 1.0.6 to 1.0.7
@@ -42,3 +42,3 @@ /** | ||
return val; | ||
} | ||
}; | ||
@@ -101,3 +101,6 @@ /** | ||
if(!valid) { | ||
throw new Error('Invalid input value ', value); | ||
var err = new Error(); | ||
err.code = 'E_INVALID_TYPE'; | ||
err.message = 'Invalid input value '+ value; | ||
throw new Error(err); | ||
} | ||
@@ -224,3 +227,3 @@ | ||
item = coerceValue(input.type[0], item, { coerce: coerce, baseType: baseType }); | ||
var valid = checkTuple(input.type[0], item) | ||
var valid = checkTuple(input.type[0], item); | ||
if(!valid) { | ||
@@ -254,3 +257,3 @@ errors.push('Invalid type for input: ' + inputName); | ||
} | ||
catch (err) { | ||
catch (e) { | ||
errors.push('Invalid type for input: ' + inputName); | ||
@@ -274,3 +277,3 @@ return; | ||
value = coerceValue(input.type, value, { coerce: coerce, baseType: baseType }); | ||
var valid = checkTuple(input.type, value) | ||
var valid = checkTuple(input.type, value); | ||
if(!valid) { | ||
@@ -291,3 +294,5 @@ errors.push('Invalid type for input: ' + inputName); | ||
if(errors.length) { | ||
throw new Error(errors); | ||
var errs = new Error(errors); | ||
errs.code = 'E_INVALID_TYPE'; | ||
throw errs; | ||
} | ||
@@ -294,0 +299,0 @@ |
{ | ||
"name": "machine", | ||
"version": "1.0.6", | ||
"version": "1.0.7", | ||
"description": "Configure and execute machines", | ||
@@ -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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
101114
3152
0