Showing 6 of 8 total issues
File eakwell.js
has 532 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
"use strict";
var _ = module.exports = {
// Empty placeholder function
exports
has 54 functions (exceeds 20 allowed). Consider refactoring. Open
Open
var _ = module.exports = {
// Empty placeholder function
noop: function() {},
Function eventHandling
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
eventHandling: function(obj) {
_.does(obj, {
listeners: [],
// Register a handler to be called every time an event happens
Function each
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
Open
each: function(items, cb) {
if(Array.isArray(items)) {
for(var i = 0; i < items.length; i++) {
var cancel = cb(items[i], i);
if(cancel) return cancel;
- 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 eventHandling
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
Open
eventHandling: function(obj) {
_.does(obj, {
listeners: [],
// Register a handler to be called every time an event happens
- 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 ajax
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
ajax: function(options) {
options = _.merge({
verb: 'GET',
url: '',
responseType: 'json',