Showing 4 of 4 total issues
Function dive
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
function dive(d,count,collections,lens,p,callback,test,cache,cxproduct){
var a=collections[d], max=collections.length-1,len=lens[d];
if (d==max) {
for (var i=0;i<len;++i) {
p[d]=a[i];
- 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 dive
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
function dive(d,count,collections,lens,p,callback,test,cache,cxproduct){
Function asGenerator
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
CXProduct.prototype.asGenerator = function() {
const ctx = this,
generator = (function* generator([head, ...tail]) {
if(head===undefined) return;
const remainder = tail.length > 0 ? generator(tail) : [[]];
- 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 get
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
CXProduct.prototype.get = function(n,{test,cache}={}){
var me = this, c = [], size = 1, value = this._cache[n];
if(value!==undefined) {
return value;
}
- 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"