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)
| Source | Type |
|---|---|
| adaptGeneratedValue | calls |