Showing 82 of 90 total issues
Avoid too many return
statements within this function. Open
!isFunction(o2[key])) return false;
Avoid too many return
statements within this function. Open
return true;
Avoid too many return
statements within this function. Open
if (pathVal == null) { onUndefined([key0, key1, key2, key3].join('.')); return };
Avoid too many return
statements within this function. Open
if (pathVal == null) { onUndefined([key0, key1, key2].join('.')); return };
Avoid too many return
statements within this function. Open
if (!equals(o1[key], o2[key])) return false;
Avoid too many return
statements within this function. Open
if (!key3) return pathVal;
Avoid too many return
statements within this function. Open
if (!key4) return pathVal;
Avoid too many return
statements within this function. Open
return true;
Avoid too many return
statements within this function. Open
return false;
Avoid too many return
statements within this function. Open
return equals(o1.getTime(), o2.getTime());
Avoid too many return
statements within this function. Open
return pathVal;
Avoid too many return
statements within this function. Open
return o1.toString() == o2.toString();
Avoid too many return
statements within this function. Open
if (!isDate(o2)) return false;
Function getFunctionNames
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
var getFunctionNames = function(str) {
if (typeof str !== 'string') {
return [];
}
// There are still a bunch of corner cases here where we aren't going to be able to handle
- 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 summarizeProperty
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function summarizeProperty (obj) {
return obj instanceof Array ?
{ '~array-length': obj.length } :
obj === null ?
null :
- 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 exports
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
module.exports = function(loadedModules) {
var undeclaredModules = [];
for(var module in loadedModules) {
var cModule = getModule(module, true);
if(!cModule) {
- 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 unary
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
unary: function() {
var token;
if (this.expect('+')) {
return this.primary();
} else if ((token = this.expect('-'))) {
- 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 bind
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function bind(self, fn) {
var curryArgs = arguments.length > 2 ? sliceArgs(arguments, 2) : [];
if (isFunction(fn) && !(fn instanceof RegExp)) {
return curryArgs.length
? function() {
- 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 exports
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
module.exports = function(createdModules) {
var unusedModules = [];
for(var module in createdModules) {
if(!getModule(module)) {
var cModule = createdModules[module],
- 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 isArrayLike
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function isArrayLike(obj) {
if (obj == null || isWindow(obj)) {
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"