Function call
has 77 lines of code (exceeds 25 allowed). Consider refactoring. Open
call() {
const event = this.event;
const target = getEventTarget(event);
let eventParams = {};
Function initEvents
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
export function initEvents(e) {
console.debug('\tEvents');
for (const eventElem of getEventElements(e)) {
var eventsData = JSON.parse(eventElem.dataset.events);
- 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 action_class
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
static action_class(action, event, root) {
const action_type = action[0];
const url = action[1];
const options = action[2];
const params = action[3];
Function initEvents
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function initEvents(e) {
console.debug('\tEvents');
for (const eventElem of getEventElements(e)) {
var eventsData = JSON.parse(eventElem.dataset.events);
Function fireAfterLoad
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function fireAfterLoad(e) {
for (const eventElem of getEventElements(e)) {
var eventsData = JSON.parse(eventElem.dataset.events);
for (var j = 0; j < eventsData.length; j++) {
var eventData = eventsData[j];
- 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 removeEvents
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export function removeEvents(elem) {
console.debug('\tuninitEvents');
for (const eventElem of getEventElements(elem)) {
let eventsData = JSON.parse(eventElem.dataset.events);
- 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"