src/api.ts
Function apiFactory
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function apiFactory() {
let casesList = [];
let elseFn = () => undefined;
let catchFn = defaultCatchFn;
Function makeMatchFunc
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function makeMatchFunc(casesList: any[], elseFn, catchFn) {
return (...values) => {
const { matchedFn, matchedArgs } = casesList.reduce(
(state, { pattern, predicate, guard = defaultGuardFn }) => {
if (state.done) {