public/browse/lib/lunr.js/example/text.js
File text.js
has 273 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/**
* @license RequireJS text 2.0.10 Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved.
* Available via the MIT or new BSD license.
* see: http://github.com/requirejs/text for details
*/
Function load
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
load: function (name, req, onLoad, config) {
//Name has format: some.module.filext!strip
//The strip part is optional.
//if strip is present, then that means only get the string contents
//inside a body tag in an HTML string. For XML/SVG content it means
Function get
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
text.get = function (url, callback, errback, headers) {
var xhr = text.createXhr(), header;
xhr.open('GET', url, true);
//Allow plugins direct access to xhr headers
Function parseName
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
parseName: function (name) {
var modName, ext, temp,
strip = false,
index = name.indexOf("."),
isRelative = name.indexOf('./') === 0 ||
Consider simplifying this complex logical expression. Open
Open
} else if (masterConfig.env === 'xpconnect' || (!masterConfig.env &&
typeof Components !== 'undefined' && Components.classes &&
Components.interfaces)) {
//Avert your gaze!
Cc = Components.classes,
Avoid deeply nested control flow statements. Open
Open
if (xpcIsWindows) {
url = url.replace(/\//g, '\\');
}
Avoid deeply nested control flow statements. Open
Open
if (headers.hasOwnProperty(header)) {
xhr.setRequestHeader(header.toLowerCase(), headers[header]);
}
Consider simplifying this complex logical expression. Open
Open
if (masterConfig.env === 'node' || (!masterConfig.env &&
typeof process !== "undefined" &&
process.versions &&
!!process.versions.node &&
!process.versions['node-webkit'])) {
Function writeFile
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
writeFile: function (pluginName, moduleName, req, write, config) {