Showing 9 of 9 total issues
Function EventObject
has 106 lines of code (exceeds 25 allowed). Consider refactoring. Open
Struck.EventObject = (function () {
'use strict';
var EventObject = Struck.BaseObject.extend();
Function Intercom
has 91 lines of code (exceeds 25 allowed). Consider refactoring. Open
Struck.Intercom = (function () {
// setup default subscription object
// used to clone and extend in `subscribe` function
var defaultSubscription = {
single: false,
Function BaseObject
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
Struck.BaseObject = (function () {
// ####BaseObject Constructor
// constructor is run when object is created
Function EventObject
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
Struck.EventObject = (function () {
'use strict';
var EventObject = Struck.BaseObject.extend();
- 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 Intercom
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
Struck.Intercom = (function () {
// setup default subscription object
// used to clone and extend in `subscribe` function
var defaultSubscription = {
single: 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 hook
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Struck.hook = (function () {
var defaults = {
prefix: 'on',
pre: 'before',
post: 'after',
Function removeListener
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
function removeListener(self, obj, events, func, context) {
events = splitName(events);
var rejects = [],
passes = [];
Function BaseObject
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
Struck.BaseObject = (function () {
// ####BaseObject Constructor
// constructor is run when object is created
- 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 removeListener
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function removeListener(self, obj, events, func, context) {