Showing 7 of 8 total issues
Function getValue
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
Open
function getValue(holder: Record<Key, unknown>, propParts: Key[]): unknown { let result: unknown = holder while (propParts.length && (isObject(result) || isArray(result))) { const propPart = propParts.shift() as Key
- Read upRead up
Function resolveLikeOperation
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function resolveLikeOperation(value: string): RegExp { switch (true) { case value.startsWith('%') && value.endsWith('%'): { const _value = extractValue('%(.*)%', value, 1) return new RegExp(`^.*${_value}.*$`, 'i')
Function compareValues
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function compareValues( property: unknown, value: unknown, operator: Operator): boolean {
Avoid too many return
statements within this function. Open
Open
return new RegExp(`^${_value}.*$`, 'i')
Avoid too many return
statements within this function. Open
Open
return new RegExp(`^${start}.*${end}$`, 'i')
Avoid too many return
statements within this function. Open
Open
return new RegExp(`^.*${_value}$`, 'i')
Avoid too many return
statements within this function. Open
Open
return new RegExp(`^.*${value}.*$`, 'i')