createClassifier function test

Last updated: 2026-03-01T23:25:47.105Z

Metrics

LOC: 17 Complexity: 4 Params: 3

Signature

createClassifier( name: FieldClassifier["name"], result: Partial<{ type: FormField["fieldType"]; confidence: number; method: FormField["detectionMethod"]; }>, ): : FieldClassifier

Source Code

function createClassifier(
  name: FieldClassifier["name"],
  result: Partial<{
    type: FormField["fieldType"];
    confidence: number;
    method: FormField["detectionMethod"];
  }>,
): FieldClassifier {
  return {
    name,
    detect: () => ({
      type: result.type ?? "unknown",
      confidence: result.confidence ?? 0,
      method: result.method ?? "html-fallback",
    }),
  };
}

No outgoing dependencies.

Impact (Incoming)

graph LR createClassifier["createClassifier"] createField["createField"] createField -->|calls| createClassifier style createClassifier fill:#dbeafe,stroke:#2563eb,stroke-width:2px click createClassifier "8858a638961c9b91.html" click createField "e0ae28ee278495ad.html"
SourceType
createField calls