public/browse/lib/lunr.js/example/mustache.js
File mustache.js
has 354 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 parseTemplate
has 84 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function parseTemplate(template, tags) {
tags = tags || mustache.tags;
template = template || '';
if (typeof tags === 'string') {
Function renderTokens
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Writer.prototype.renderTokens = function (tokens, context, partials, originalTemplate) {
var buffer = '';
// This function is used to render an arbitrary template
// in the current context by higher-order sections.
Avoid deeply nested control flow statements. Open
Open
if (value != null) buffer += value;
Avoid deeply nested control flow statements. Open
Open
if (typeof originalTemplate !== 'string') {
throw new Error('Cannot use higher-order sections without the original template');
}