eloqjs/collection

View on GitHub
src/helpers/getProp.ts

Summary

Maintainability
A
1 hr
Test Coverage
A
100%

Showing 1 of 1 total issue

Function getValue has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
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
Severity: Minor
Found in src/helpers/getProp.ts - About 1 hr to fix
Category
Status