Comparing version 1.5.0 to 1.5.1
@@ -62,21 +62,22 @@ (function(scope) { | ||
this.checkArgs = function(argsParam, names) { | ||
var error, | ||
msg = '', | ||
i = 0, | ||
n = names.length, | ||
isLength = n === argsParam.length, | ||
this.checkArgs = function(args, names) { | ||
var msg = '', | ||
template = '', | ||
name = '', | ||
lenNames = names.length, | ||
lenArgs = args.length, | ||
lessArgs = lenArgs < lenNames; | ||
if (lessArgs) { | ||
template = '{{ name }} coud not be empty!'; | ||
name = names[lenNames - 1]; | ||
msg = Util.render(template, { | ||
name: name | ||
}); | ||
throw(Error(msg)); | ||
} | ||
if (!isLength) | ||
for (i = 0; i < n; i++) | ||
if (!argsParam[i]) { | ||
msg = Util.render(template, { | ||
name: names[i] | ||
}); | ||
error = new Error(msg); | ||
throw(error); | ||
} | ||
return this; | ||
@@ -363,5 +364,7 @@ }; | ||
* function render template with view and own symbols | ||
* @templ | ||
* @view | ||
* @symbols | ||
* | ||
* @param templ | ||
* @param view | ||
* @param symbols | ||
* @param notEscape | ||
*/ | ||
@@ -368,0 +371,0 @@ this.ownRender = function(templ, view, symbols, notEscape) { |
{ | ||
"name": "util-io", | ||
"version": "1.5.0", | ||
"version": "1.5.1", | ||
"author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)", | ||
@@ -5,0 +5,0 @@ "description": "Util-io - utilites for vanila 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
28803
6
628