Showing 102 of 109 total issues
Function $iterator
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
export default function $iterator(obj) {
// empty iteration
if (obj === null || obj === undefined) {
return new EmptyIterator();
}
- 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 buffer
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
export default function buffer(value, forceIterate) {
if (!forceIterate) {
if (isArrayLike(value)) { // array-likes have fixed element count
return arrayBuffer(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"
Further reading
Function binarySearch
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
export default function binarySearch(array, index, length, value, compare) {
Function join
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
join: function (inner, outerKeySelector, innerKeySelector, resultSelector, comparer) {
Function groupJoin
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
groupJoin: function (inner, outerKeySelector, innerKeySelector, resultSelector, comparer) {
Function OrderedIterable
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
export default function OrderedIterable(source, keySelector, comparer, descending, parent) {
Function groupIterator
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
export default function groupIterator(source, keySelector, elementSelector, resultSelector, comparer) {
Function isType
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
export default function isType(obj, type) {
// use 'typeof' operator in an if clause yields in better performance than switch-case
if (obj === null || obj === undefined) {
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"
Further reading
Function remove
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
remove: function (key) {
var comparer = this.comparer,
hash = comparer.hash(key) & 0x7FFFFFFF, // hash-code of the key
bucket = hash % this.buckets.length, // bucket index
last,
- 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 removeAll
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
removeAll: function (match) {
assertType(match, Function);
var freeIndex = 0,
len = this.length;
- 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 sumIterator
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
export default function sumIterator(source, selector) {
assertNotNull(source);
if (selector) {
assertType(selector, 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 isSupersetOf
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
isSupersetOf: function (other) {
assertNotNull(other);
var c = collectionCount(other);
- 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
Avoid too many return
statements within this function. Open
return res > 0 ? 1 : (res < 0 ? -1 : 0);
Avoid too many return
statements within this function. Open
return new EnumerableIterator(obj);
Avoid too many return
statements within this function. Open
return new Iterable(value);
Avoid too many return
statements within this function. Open
return compute31BitDateHash(obj);
Avoid too many return
statements within this function. Open
return type === Boolean;
Avoid too many return
statements within this function. Open
return new Iterable(value);
Avoid too many return
statements within this function. Open
return computeObjectEquals(objA, objB);
Avoid too many return
statements within this function. Open
return false;