resources/lib/mustache/mustache.js
File mustache.js
has 462 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global = global || self, global.Mustache = factory());
}(this, (function () { 'use strict';
Function parseTemplate
has 102 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function parseTemplate (template, tags) {
if (!template)
return [];
var lineHasNonSpace = false;
var sections = []; // Stack to hold section tokens
Function lookup
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Context.prototype.lookup = function lookup (name) {
var cache = this.cache;
var value;
if (cache.hasOwnProperty(name)) {
Avoid deeply nested control flow statements. Open
Open
if (index === names.length - 1)
lookupHit = (
hasProperty(intermediateValue, names[index])
|| primitiveHasOwnProperty(intermediateValue, names[index])
);
Function renderInverted
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
Writer.prototype.renderInverted = function renderInverted (token, context, partials, originalTemplate, config) {
Function renderTokens
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
Writer.prototype.renderTokens = function renderTokens (tokens, context, partials, originalTemplate, config) {
Function renderSection
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
Writer.prototype.renderSection = function renderSection (token, context, partials, originalTemplate, config) {