Showing 102 of 109 total issues
Function isProperSupersetOf
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
isProperSupersetOf: function (other) {
assertNotNull(other);
// the empty set isn't a proper superset of any set.
if (this.count() === 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 remove
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
remove: function (value) {
var node;
if (value instanceof LinkedListNode) {
node = value;
Function compare
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function compare(objA, objB) {
// Identical objects
if (objA === objB) {
return 0;
}
Function skipIterator
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function skipIterator(source, count) {
assertNotNull(source);
assertType(count, Number);
count = Math.max(count, 0);
Function defaultIfEmptyIterator
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function defaultIfEmptyIterator(source, defaultValue) {
assertNotNull(source);
return new Iterable(function () {
var it = $iterator(source),
Function remove
has 26 lines of code (exceeds 25 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,
Function transpileTests
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
function transpileTests() {
var units = grunt.file.expand({
cwd: dirs.unit
}, '**/[^_]*.js');
var pattern = /^.*multiplex$/;
Function findLast
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
findLast: function (value) {
if (this.head === null) {
return null;
}
Function exports
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function (grunt) {
'use strict';
grunt.task.registerTask('qtest', 'run all unit tests', function () {
var done = this.async(),
Function isProperSubsetOf
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
isProperSubsetOf: 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
Function firstOrDefaultIterator
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
export default function firstOrDefaultIterator(source, predicate, defaultValue) {
assertNotNull(source);
predicate = predicate || trueFunction;
assertType(predicate, 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 SortedList
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
export default function SortedList(value, comparer) {
var dic = isType(value, Dcitionary) ? value : null,
capacity = isNumber(value, Number) ? value : (dic ? dic.count() : 0);
comparer = Comparer.from(comparer || 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 findIndex
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
findIndex: function (startIndexOrMatch, countOrMatch, match) {
var len = this.length,
startIndex = isNumber(startIndexOrMatch) ? startIndexOrMatch : 0,
count = isNumber(countOrMatch) ? countOrMatch : len - startIndex;
- 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 lastOrDefaultIterator
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
export default function lastOrDefaultIterator(source, predicate, defaultValue) {
assertNotNull(source);
predicate = predicate || trueFunction;
assertType(predicate, 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 joinIterator
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
export default function joinIterator(outer, inner, outerKeySelector, innerKeySelector, resultSelector, comparer) {
Function capacity
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
capacity: function (value) {
if (value === null || value === undefined) {
return this.slot.keys.length;
} else {
assertType(value, Number);
- 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 insert
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
insert: function (index, key, value) {
var slot = this.slot;
if (slot.size === slot.keys.length) {
var newCapacity = slot.keys.length === 0 ? 4 : slot.keys.length * 2,
- 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 groupJoinIterator
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
export default function groupJoinIterator(outer, inner, outerKeySelector, innerKeySelector, resultSelector, comparer) {
Function findLastIndex
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
findLastIndex: function (startIndexOrMatch, countOrMatch, match) {
var startIndex = isNumber(startIndexOrMatch) ? startIndexOrMatch : this.length - 1,
count = isNumber(countOrMatch) ? countOrMatch : startIndex;
match = isFunction(startIndexOrMatch) ? startIndexOrMatch : (isFunction(countOrMatch) ? countOrMatch : match);
- 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 $iterable
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
export default function $iterable(value) {
if (value === null || value === undefined) {
return new EmptyIterable();
}
- 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"