Showing 43 of 119 total issues
Function rangedSort
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
export function rangedSort<T, U=T>(x: T[], i: number, I: number, fc: CompareFunction<T|U> | null=null, fm: MapFunction<T, T|U> | null=null, fs: SwapFunction<T> | null=null): T[] {
Function rangedSort$
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
export function rangedSort$<T, U=T>(x: T[], i: number, I: number, fc: CompareFunction<T|U> | null=null, fm: MapFunction<T, T|U> | null=null, fs: SwapFunction<T> | null=null): T[] {
Function partialSort$
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
export function partialSort$<T, U=T>(x: T[], n: number, fc: CompareFunction<T|U> | null=null, fm: MapFunction<T, T|U> | null=null, fs: SwapFunction<T> | null=null): T[] {
Function partialSort
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
export function partialSort<T, U=T>(x: T[], n: number, fc: CompareFunction<T|U> | null=null, fm: MapFunction<T, T|U> | null=null, fs: SwapFunction<T> | null=null): T[] {
Function copy
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
export function copy<T>(x: T[], y: T[], j: number=0, i: number=0, I: number=y.length): T[] {
Function swapRanges
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
export function swapRanges<T>(x: T[], i: number, I: number, j: number, J: number): T[] {
Function copy$
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
export function copy$<T>(x: T[], y: T[], j: number=0, i: number=0, I: number=y.length): T[] {
Function swapRanges$
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
export function swapRanges$<T>(x: T[], i: number, I: number, j: number, J: number): T[] {
Function flatTo$
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function flatTo$(a: any[], x: any[], n: number, fm: MapFunction<any, any>, ft: TestFunction<any>): any[] {
Function isInfixAt
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function isInfixAt<T, U=T>(x: T[], y: T[], i: number, fc: CompareFunction<T|U>, fm: MapFunction<T, T|U>): boolean {
Function uniqueDual
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function uniqueDual<T, U=T>(x: T[], fc: CompareFunction<T|U> | null=null, fm: MapFunction<T, T|U> | null=null): T[] {
var fc = fc || COMPARE;
var fm = fm || IDENTITY;
var i = -1, s = [], a = [];
x: for (var vx of x) {
- 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 differenceDual
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function differenceDual<T, U=T>(x: T[], y: T[], fc: CompareFunction<T|U> | null=null, fm: MapFunction<T, T|U> | null=null): T[] {
var fc = fc || COMPARE;
var fm = fm || IDENTITY;
var y1 = [...y].map(fm);
var i = -1, a = [];
- 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 searchSubsequence
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
export function searchSubsequence<T, U=T>(x: T[], y: T[], fc: CompareFunction<T|U> | null=null, fm: MapFunction<T, T|U> | null=null): number {
var fc = fc || COMPARE;
var fm = fm || IDENTITY;
var y1 = [...y].map(fm), Y = y1.length;
var a = -1, i = -1, j = 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 rangeEntries
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
export function rangeEntries<T, U=T>(x: T[], fc: CompareFunction<T|U> | null=null, fm: MapFunction<T, T|U> | null=null): [[number, T], [number, T]] {
var fc = fc || COMPARE;
var fm = fm || IDENTITY;
var X = x.length;
if (X===0) return [[-1, undefined], [-1, undefined]];
- 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 intersectionDual
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function intersectionDual<T, U=T>(x: T[], y: T[], fc: CompareFunction<T|U> | null=null, fm: MapFunction<T, T|U> | null=null): T[] {
var fc = fc || COMPARE;
var fm = fm || IDENTITY;
var y1 = [...y].map(fm);
var i = -1, a = [];
- 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 unionDual$
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function unionDual$<T, U=T>(x: T[], y: T[], fc: CompareFunction<T|U> | null=null, fm: MapFunction<T, T|U> | null=null): T[] {
var fc = fc || COMPARE;
var fm = fm || IDENTITY;
var x1 = x.map(fm), i = -1;
y: for (var vy of y) {
- 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 generateWiki
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function generateWiki(ds) {
var rkind = /namespace|function/i, useWiki = true;
var dm = new Map(ds.map(d => [d.name, d]));
for (var d of ds) {
var f = `wiki/${d.name}.md`;
- 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 rangedPartialSelectionSort$
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function rangedPartialSelectionSort$<T, U=T>(x: T[], i: number, I: number, n: number, fc: CompareFunction<T|U>, fm: MapFunction<T, T|U>, fs: SwapFunction<T>): T[] {
for (var j=i; n>0 && j<I; ++j, --n) {
var l = j;
var wl = fm(x[l], l, x);
for (var k=j+1; k<I; ++k) {
- 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 searchUnsortedValue
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export function searchUnsortedValue<T, U=T>(x: T[], fc: CompareFunction<T|U> | null=null, fm: MapFunction<T, T|U> | null=null): number {
var fc = fc || COMPARE;
var fm = fm || IDENTITY;
var X = x.length;
if (X<=1) return -1;
- 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 isDisjointDual
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function isDisjointDual<T, U=T>(x: T[], y: T[], fc: CompareFunction<T|U> | null=null, fm: MapFunction<T, T|U> | null=null): boolean {
var fc = fc || COMPARE;
var fm = fm || IDENTITY;
var y1 = [...y].map(fm), i = -1;
for (var vx of x) {
- 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"