detect method ✓ 100.0%
Last updated: 2026-02-24T19:46:21.771Z
Metrics
LOC: 8
Complexity: 3
Params: 1
Coverage: 100.0% (3/3 lines, 4x executed)
Signature
detect(field): : ClassifierResult
Source Code
detect(field): ClassifierResult {
const inputType =
"type" in field.element
? (field.element as HTMLInputElement).type?.toLowerCase()
: "";
const type: FieldType = HTML_FALLBACK_MAP[inputType] ?? "unknown";
return { type, confidence: 0.1 };
},
Dependencies (Outgoing)
| Target | Type |
|---|---|
| FieldType | uses |
| FieldClassifier | uses |
| ClassifierResult | uses |
No incoming dependencies.