Comparing version 1.2.1 to 1.3.0
@@ -25,3 +25,3 @@ (function(global) { | ||
if (typeof args[name] === 'undefined') | ||
throwError(name + template); | ||
throw Error(name + template); | ||
}); | ||
@@ -50,17 +50,6 @@ | ||
throwError(name + template); | ||
throw Error(name + template); | ||
} | ||
} | ||
function throwError(msg) { | ||
var error = Error(msg); | ||
if (typeof process === 'undefined') { | ||
throw error; | ||
} else { | ||
console.error(error.message, error.stack); | ||
process.exit(-1); | ||
} | ||
} | ||
check.check = check; | ||
@@ -79,3 +68,3 @@ | ||
if (!is) | ||
throwError(name + ' should be ' + type); | ||
throw Error(name + ' should be ' + type); | ||
@@ -82,0 +71,0 @@ return check; |
{ | ||
"name": "checkup", | ||
"version": "1.2.1", | ||
"version": "1.3.0", | ||
"author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)", | ||
@@ -5,0 +5,0 @@ "description": "check arguments and if they wrong throw exeption", |
Sorry, the diff of this file is not supported yet
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
5246
67