src/etc/views.js
function (/**Array|Object*/tmpl, /**Object*/data) /**String*/{
            var res= "";
            // there are thre possible declarations array of functions, string and function
            // array case
            if (franky.isArray(tmpl)) {
                res = franky.map(tmpl, function (item) {
                    return typeof item === "string" ?
                        item:
                        item(data);
                }).join("");
            // function case
            } else if (franky.isFunction(tmpl)) {
                res = tmpl(data);
            // default string case
            } else {
                res = tmpl.toString();
            }

            return res;
        }
function (/**Array|Object*/tmpl, /**Object*/data) /**String*/{
            var res= "";
            // there are thre possible declarations array of functions, string and function
            // array case
            if (franky.isArray(tmpl)) {
                res = franky.map(tmpl, function (item) {
                    return typeof item === "string" ?
                        item:
                        item(data);
                }).join("");
            // function case
            } else if (franky.isFunction(tmpl)) {
                res = tmpl(data);
            // default string case
            } else {
                res = tmpl.toString();
            }

            return res;
        }
function ( /**Array|Object*/ tmpl , /**Object*/ data ) /**String*/ { var res = "" ; // there are thre possible declarations array of functions, string and function // array case if ( franky . isArray ( tmpl ) ) { res = franky . map ( tmpl , function ( item ) { return typeof item === "string" ? item : item ( data ) ; } ) . join ( "" ) ; // function case } else if ( franky . isFunction ( tmpl ) ) { res = tmpl ( data ) ; // default string case } else { res = tmpl . toString ( ) ; } return res ; }
Returns processed string
Returns processed string