Showing 86 of 133 total issues
Avoid too many return
statements within this function. Open
if (aggregate !== 'sum' && aggregate !== 'min' && aggregate !== 'max') return BAD_SYNTAX;
Function LINSERT
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
, LINSERT: function (key, relpos, pivot, value) {
var K = this.getKey(LIST, key), x;
if (K instanceof ERROR) return K;
relpos = relpos.toUpperCase();
- 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 str2float
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
var str2float = function (string) {
var value = Number(string);
if (typeof string !== 'string') throw new Error("WOOT! str2float: '" + string + "' not a string.");
if (string === '+inf') value = Number.POSITIVE_INFINITY;
else if (string === '-inf') value = Number.NEGATIVE_INFINITY;
- 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 SADD
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
, SADD: function () {
var key = arguments[0]
, i, n = arguments.length
, x = 0;
- 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 lPush
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
, lPush: function (left, make, args) {
var i, n = args.length, key = args[0];
var K = this.getKey(LIST, key, make);
if (K instanceof ERROR) return K;
if (n < 2) return BAD_ARGS;
- 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 HMGET
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
, HMGET: function () {
var K = this.getKey(HASH, arguments[0]);
if (K instanceof ERROR) return K;
var i, n = arguments.length, values = [];
- 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"