nationid - v2.2.1
    Preparing search index...

    Function getDocumentInfo

    • Resolve one document's catalog info in the requested locale.

      Parameters

      • code: DocumentTypeCode

        Stable DocumentTypeCode (e.g. "BR_CPF").

      • locale: Locale = DEFAULT_LOCALE

        Display locale (default "en").

      Returns DocumentInfo | null

      A DocumentInfo with localized names, or null if code is not registered.

      import { getDocumentInfo } from "nationid/catalog";

      const info = getDocumentInfo("BR_CPF", "pt");
      info?.displayName; // "CPF"
      info?.longName; // "Cadastro de Pessoas FĂ­sicas"