Showing 45 of 68 total issues
Function default
has a Cognitive Complexity of 35 (exceeds 5 allowed). Consider refactoring. Open
export default function(searchBox) {
if (searchBox.id != this.id + '_search') {
return false;
}
- 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 default
has a Cognitive Complexity of 35 (exceeds 5 allowed). Consider refactoring. Open
export default function(start, filter, sortColumn, ascending, callback) { //callback if async
var dable = this;
if (typeof callback === 'undefined') {
callback = false;
}
- 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 default
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
export default function(input) { //Check for existing table
if (input) {
if (input.nodeType && input.nodeName.toLowerCase() == 'div') {
if (input.hasAttribute('id')) {
this.id = input.getAttribute('id');
- 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 default
has 84 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function() {
var ul = document.createElement('ul');
var li = document.createElement('li');
var anchor = document.createElement('a');
var right = ul.cloneNode(false);
Function default
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function(tableDiv) {
if (this.dableClass) {
tableDiv.setAttribute('class', this.dableClass);
}
Function default
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
export default function() {
var ul = document.createElement('ul');
var li = document.createElement('li');
var anchor = document.createElement('a');
var right = ul.cloneNode(false);
- 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 default
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function(columnIndex, ascending, currentRowObjects) {
var isInt = true;
var isDate = true;
var newRowObjects = currentRowObjects.slice(0);
for (var i = 0; i < currentRowObjects.length; ++i) {
Function default
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
export default function(columnCell) {
var tag = columnCell.tagName;
//prevent sorting from some form elements
if (tag != 'INPUT' && tag != 'BUTTON' && tag != 'SELECT' &&
tag != 'TEXTAREA') {
- 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 default
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function(tableDiv) {
if (!tableDiv) {
return false;
}
Function default
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function(tableDiv) {
if (!tableDiv) {
return false;
}
Function default
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function(start, filter, sortColumn, ascending, callback) { //callback if async
var dable = this;
if (typeof callback === 'undefined') {
callback = false;
}
Function default
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
export default function(body) {
if (!body) {
body = document.getElementById(this.id + '_body');
if (!body) {
return false;
- 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 default
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function(tableDiv) {
if (!tableDiv) {
return false;
}
var div = document.createElement('div');
Function default
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function(searchBox) {
if (searchBox.id != this.id + '_search') {
return false;
}
Function default
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function(columnCell) {
var tag = columnCell.tagName;
//prevent sorting from some form elements
if (tag != 'INPUT' && tag != 'BUTTON' && tag != 'SELECT' &&
tag != 'TEXTAREA') {
Function default
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function(body) {
if (!body) {
body = document.getElementById(this.id + '_body');
if (!body) {
return false;
Function onreadystatechange
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
dableRequest.onreadystatechange = function() {
if (dableRequest.readyState == 4 && dableRequest.status == 200) {
var data = JSON.parse(dableRequest.responseText);
var actualData = data;
if (data.rows === undefined) {
Function default
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function(tableDiv) {
tableDiv.removeAttribute('class');
var children = tableDiv.children;
for (var i = 0; i < children.length; ++i) {
children[i].removeAttribute('class');
Function default
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function(tableNode) {
if (!tableNode) {
console.error('Dable Error: No HTML table to generate dable from');
return false;
}
Function default
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function(tableDiv) {
if (!tableDiv) {
return false;
}