Comparing version 1.6.3 to 1.6.4
@@ -367,18 +367,2 @@ (function(scope) { | ||
/** | ||
* function render template with view | ||
* @templ | ||
* @view | ||
*/ | ||
this.render = function(templ, view) { | ||
var ret, | ||
NOT_ESCAPE = true, | ||
SPACES = '\\s*', | ||
symbols = ['{{' + SPACES, SPACES + '}}']; | ||
ret = Util.ownRender(templ, view, symbols, NOT_ESCAPE); | ||
return ret; | ||
}; | ||
/** | ||
* function render template with view and own symbols | ||
@@ -388,13 +372,6 @@ * | ||
* @param view | ||
* @param symbols | ||
* @param notEscape | ||
*/ | ||
this.ownRender = function(templ, view, symbols, notEscape) { | ||
var str, expr, | ||
ret = templ, | ||
firstChar, | ||
secondChar; | ||
firstChar = symbols[0]; | ||
secondChar = symbols[1] || firstChar; | ||
this.render = function(templ, view) { | ||
var str, regExp, | ||
result = templ; | ||
@@ -405,11 +382,10 @@ Object | ||
str = view[param]; | ||
str = Util.exec(str) || str; | ||
expr = firstChar + param + secondChar; | ||
ret = Util.replaceStr(ret, expr, str, notEscape); | ||
regExp = RegExp('{{\\s*' + param + '\\s*}}', 'g'); | ||
result = result.replace(regExp, str); | ||
}); | ||
expr = firstChar + '.*' + secondChar; | ||
ret = Util.replaceStr(ret, expr, '', notEscape); | ||
if (~result.indexOf('{{')) | ||
result = result.replace(/{{\s*.*\s*}}/, ''); | ||
return ret; | ||
return result; | ||
}; | ||
@@ -474,16 +450,2 @@ | ||
/** | ||
* function calls forEach for all array like variables | ||
* | ||
* @param array | ||
*/ | ||
this.forEach = function(array, callback) { | ||
var ret = []; | ||
if (array) | ||
ret = [].forEach.call(array, callback); | ||
return ret; | ||
}; | ||
this.exec = new ExecProto(); | ||
@@ -490,0 +452,0 @@ |
{ | ||
"name": "util-io", | ||
"version": "1.6.3", | ||
"version": "1.6.4", | ||
"author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)", | ||
@@ -5,0 +5,0 @@ "description": "Util-io - utilites for vanila js", |
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
28808
616