resolveMaxLength function ✓ 100.0%

Last updated: 2026-02-24T21:07:57.586Z

Metrics

LOC: 12 Complexity: 4 Params: 1 Coverage: 100.0% (6/6 lines, 17x executed)

Signature

resolveMaxLength(constraints: ValueConstraints): : number

Source Code

function resolveMaxLength(constraints: ValueConstraints): number {
  if (typeof constraints.maxLength === "number") {
    return constraints.maxLength;
  }

  const el = constraints.element;
  if (el instanceof HTMLInputElement || el instanceof HTMLTextAreaElement) {
    return el.maxLength;
  }

  return -1;
}

No outgoing dependencies.

Impact (Incoming)

graph LR resolveMaxLength["resolveMaxLength"] adaptGeneratedValue["adaptGeneratedValue"] adaptGeneratedValue -->|calls| resolveMaxLength style resolveMaxLength fill:#dbeafe,stroke:#2563eb,stroke-width:2px click resolveMaxLength "30b51c9b1c4a4dca.html" click adaptGeneratedValue "08c3ad8d1ea27c4d.html"
SourceType
adaptGeneratedValue calls