Skip to main content
Version: v0.0.3

Interface: DetectResult

How confident autodetection is:

  • certain: exactly one signature matched (format names it);
  • ambiguous: more than one matched (format is null; candidates names them);
  • none: nothing matched (format is null; candidates is empty).

format is null unless confidence is certain, so a non-certain result can never be mistaken for a routable format.

Properties

candidates

readonly candidates: readonly CosyteFormat[]

The matching candidate formats (0 for none, 1 for certain, ≥2 for ambiguous). Value-free.


confidence

readonly confidence: "certain" | "ambiguous" | "none"

The detection confidence.


format

readonly format: CosyteFormat | null

The detected format, or null when confidence is not certain.