nationid - v2.2.1
    Preparing search index...

    Function supports

    • Returns whether code exposes the requested extract kind.

      Use this to gate UI affordances (e.g. only show a "show birthday" button for documents that encode a DOB).

      Parameters

      Returns boolean

      true if code can answer kind, false otherwise.

      import { supports } from "nationid/extract";

      supports("MX_CURP", "dob"); // true
      supports("MX_CURP", "sex"); // true
      supports("SV_DUI", "dob"); // false (DUI does not encode DOB)