lib/build/mustache.js
File mustache.js
has 413 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*!
* mustache.js - Logic-less {{mustache}} templates with JavaScript
* http://github.com/janl/mustache.js
*/
Function parse
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function parse(template, tags) {
tags = tags || exports.tags;
var tagRes = escapeTags(tags);
var scanner = new Scanner(template);
Function nestTokens
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function nestTokens(tokens) {
var tree = [];
var collector = tree;
var sections = [];
var token, section;
Function compileTokens
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function compileTokens(tokens, returnBody) {
var body = ['""'];
var token, method, escape;
for (var i = 0, len = tokens.length; i < len; ++i) {
Function lookup
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Context.prototype.lookup = function (name) {
var value = this._cache[name];
if (!value) {
if (name === ".") {
Avoid deeply nested control flow statements. Open
Open
while (value && i < names.length) {
value = value[names[i++]];
}
Avoid too many return
statements within this function. Open
Open
return "";