src/services/owlFilter.js
Function owlFilter
has 145 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function owlFilter (owlConstants, owlUtils) {
return {
hasNoFilters: function (columns) {
return _.every(columns, function (column) {
Function filterCell
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
filterCell: function (row, column, termCache, i, filter) {
var conditionType = typeof filter.condition;
if (conditionType === 'undefined' || !conditionType) {
filter.condition = owlConstants.filtering.CONTAINS;
}
Function filterTable
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
filterTable: function (rows, columns) {
var self = this;
if (!rows) {
return;
Avoid deeply nested control flow statements. Open
Open
} else if (filter.condition === owlConstants.filtering.CONTAINS) {
var containsRE = termCache(cacheId) ? termCache(cacheId) : termCache(cacheId, new RegExp(term, regexpFlags));
if (!containsRE.test(value)) {
return false;
Avoid deeply nested control flow statements. Open
Open
if (value.length !== 0) {
return false;
}
Function filterCell
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
filterCell: function (row, column, termCache, i, filter) {
Avoid too many return
statements within this function. Open
Open
return false;
Avoid too many return
statements within this function. Open
Open
return false;
Avoid too many return
statements within this function. Open
Open
return true;
Avoid too many return
statements within this function. Open
Open
return false;
Avoid too many return
statements within this function. Open
Open
return false;