AlfonsoFilho/match-ish

View on GitHub
src/api.ts

Summary

Maintainability
A
2 hrs
Test Coverage

Function apiFactory has 36 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function apiFactory() {
  let casesList = [];
  let elseFn = () => undefined;
  let catchFn = defaultCatchFn;

Severity: Minor
Found in src/api.ts - About 1 hr to fix

    Function makeMatchFunc has 26 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function makeMatchFunc(casesList: any[], elseFn, catchFn) {
      return (...values) => {
        const { matchedFn, matchedArgs } = casesList.reduce(
          (state, { pattern, predicate, guard = defaultGuardFn }) => {
            if (state.done) {
    Severity: Minor
    Found in src/api.ts - About 1 hr to fix

      There are no issues that match your filters.

      Category
      Status