typeof-arguments
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -16,8 +16,8 @@ module.exports = function(a,o,c){ | ||
r = false; | ||
var a = typeName(a[x]); | ||
var act = typeName(a[x]); | ||
var exp = t.split('|').map((i)=>i[0].toUpperCase()+i.slice(1).toLowerCase()).join('|'); | ||
if(clb){ | ||
c(`[${a}]`,`[${exp}]`); | ||
c(`[${act}]`,`[${exp}]`); | ||
} else { | ||
console.log(new TypeError(`\x1b[31mInvalid argument. The [${a}] argument has been passed, while the [${exp}] one is expected.\x1b[0m`)); | ||
console.log(new TypeError(`\x1b[31mInvalid argument. The [${act}] argument has been passed, while the [${exp}] one is expected.\x1b[0m`)); | ||
} | ||
@@ -24,0 +24,0 @@ } |
{ | ||
"name": "typeof-arguments", | ||
"version": "1.0.0", | ||
"version": "1.0.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
6922