tdreyno/leisure

View on GitHub

Showing 8 of 23 total issues

File Seq.ts has 529 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import { identity } from "@tdreyno/figment"

export const DONE = Symbol()

type Tramp<T> = () => typeof DONE | T
Severity: Major
Found in src/Seq.ts - About 1 day to fix

    Seq has 45 functions (exceeds 20 allowed). Consider refactoring.
    Open

    export class Seq<T> {
      public static MAX_YIELDS = 1_000_000
    
      private yields_ = 0
    
    
    Severity: Minor
    Found in src/Seq.ts - About 6 hrs to fix

      Function partitionBy has 52 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        public partitionBy(
          fn: (value: T, index: number) => unknown,
        ): [Seq<T>, Seq<T>] {
          // eslint-disable-next-line @typescript-eslint/no-this-alias
          const self = this
      Severity: Major
      Found in src/Seq.ts - About 2 hrs to fix

        Function zip2With has 33 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          public zip2With<T2, T3, T4>(
            fn: (
              [result1, result2, result3]:
                | [T, T2, T3]
                | [T, undefined, undefined]
        Severity: Minor
        Found in src/Seq.ts - About 1 hr to fix

          Avoid too many return statements within this function.
          Open

                    return fn([undefined, undefined, result3], counter++)
          Severity: Major
          Found in src/Seq.ts - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

                    return fn([result1 as T, result2 as T2, result3 as T3], counter++)
            Severity: Major
            Found in src/Seq.ts - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                        return fn([undefined, result2, result3], counter++)
              Severity: Major
              Found in src/Seq.ts - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                          return fn([undefined, result2, undefined], counter++)
                Severity: Major
                Found in src/Seq.ts - About 30 mins to fix
                  Severity
                  Category
                  Status
                  Source
                  Language