Showing 297 of 342 total issues
Function tld
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
p.tld = function(v, build) {
if (this._parts.urn) {
return v === undefined ? '' : this;
}
if (typeof v === 'boolean') {
Function analyze
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function analyze(analyzerContext, startIndex) {
var nodes,
lastIndex,
container,
i,
Function parse
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
URI.parse = function(string, parts) {
var pos, t;
if (!parts) {
parts = {};
}
Function tld
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
p.tld = function(v, build) {
if (this._parts.urn) {
return v === undefined ? '' : this;
}
if (typeof v === 'boolean') {
Function createBetweenRule
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function createBetweenRule(startIndex, opener, closer, caseInsensitive) {
return function(tokens) {
var index = startIndex,
token,
success = false;
Function createBetweenRule
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function createBetweenRule(startIndex, opener, closer, caseInsensitive) {
return function(tokens) {
var index = startIndex,
token,
success = false;
Function reload
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
reload: function (callback) {
if (typeof callback !== 'function') {
callback = function () {};
}
Function parseOptions
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
Open
function parseOptions(options, callback) {
"use strict";
var _ = require('underscore');
var config = require('./config');
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function pt
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function pt(e, t) {
var r = t.length > 0,
s = e.length > 0,
o = function(u, a, f, l, h) {
var p, d, v, m = [],
Function On
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function On(e, t) {
var n, r, i, s, o = e.dataTypes.slice(),
u = o[0],
a = {},
f = 0;
Function On
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function On(e, t) {
var n, r, i, s, o = e.dataTypes.slice(),
u = o[0],
a = {},
f = 0;
Function pt
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function pt(e, t) {
var r = t.length > 0,
s = e.length > 0,
o = function(u, a, f, l, h) {
var p, d, v, m = [],
Consider simplifying this complex logical expression. Open
Open
if (/\\[bdsw]/i.test(j)) a.push(j);
else {
var j = m(j),
d;
c + 2 < i && "-" === f[c + 1] ? (d = m(f[c + 2]), c += 2) : d = j;
Consider simplifying this complex logical expression. Open
Open
if (n.dataTypes[0] === "jsonp" || c || h) return s = n.jsonpCallback = v.isFunction(n.jsonpCallback) ? n.jsonpCallback() : n.jsonpCallback, o = e[s], c ? n.url = f.replace(Dn, "$1" + s) : h ? n.data = a.replace(Dn, "$1" + s) : l && (n.url += (_n.test(f) ? "&" : "?") + n.jsonp + "=" + s), n.converters["script json"] = function() {
return u || v.error(s + " was not called"), u[0]
}, n.dataTypes[0] = "json", e[s] = function() {
u = arguments
}, i.always(function() {
Consider simplifying this complex logical expression. Open
Open
if (!o && !p.noBubble && !v.isWindow(s)) {
g = p.delegateType || y, l = Y.test(g + y) ? s : s.parentNode;
for (c = s; l; l = l.parentNode) m.push([l, g]), c = l;
c === (s.ownerDocument || i) && m.push([c.defaultView || c.parentWindow || e, g])
}
Consider simplifying this complex logical expression. Open
Open
if (/\\[bdsw]/i.test(j)) a.push(j);
else {
var j = m(j),
d;
c + 2 < i && "-" === f[c + 1] ? (d = m(f[c + 2]), c += 2) : d = j;
Consider simplifying this complex logical expression. Open
Open
if (o) {
u = v._data(e, "fxshow") || v._data(e, "fxshow", {}), "hidden" in u && (g = u.hidden), a && (u.hidden = !g), g ? v(e).show() : h.done(function() {
v(e).hide()
}), h.done(function() {
var t;
Consider simplifying this complex logical expression. Open
Open
if (o) {
u = v._data(e, "fxshow") || v._data(e, "fxshow", {}), "hidden" in u && (g = u.hidden), a && (u.hidden = !g), g ? v(e).show() : h.done(function() {
v(e).hide()
}), h.done(function() {
var t;
Consider simplifying this complex logical expression. Open
Open
if (n.dataTypes[0] === "jsonp" || c || h) return s = n.jsonpCallback = v.isFunction(n.jsonpCallback) ? n.jsonpCallback() : n.jsonpCallback, o = e[s], c ? n.url = f.replace(Dn, "$1" + s) : h ? n.data = a.replace(Dn, "$1" + s) : l && (n.url += (_n.test(f) ? "&" : "?") + n.jsonp + "=" + s), n.converters["script json"] = function() {
return u || v.error(s + " was not called"), u[0]
}, n.dataTypes[0] = "json", e[s] = function() {
u = arguments
}, i.always(function() {
Consider simplifying this complex logical expression. Open
Open
if (!o && !p.noBubble && !v.isWindow(s)) {
g = p.delegateType || y, l = Y.test(g + y) ? s : s.parentNode;
for (c = s; l; l = l.parentNode) m.push([l, g]), c = l;
c === (s.ownerDocument || i) && m.push([c.defaultView || c.parentWindow || e, g])
}