idnumbers
    Preparing search index...

    Interface IdMetadata

    Metadata interface for ID number types

    interface IdMetadata {
        aliasOf: IdNumberClass<object> | null;
        checksum: boolean;
        checksumAlgorithm?: string;
        countryName?: string;
        deprecated: boolean;
        displayFormat?: string;
        example?: string;
        idType?: string;
        iso3166Alpha2: string;
        links: string[];
        masks?: readonly string[];
        maxLength: number;
        minLength: number;
        names: string[];
        officialName?: string;
        parsable: boolean;
        regexp: RegExp;
    }
    Index
    aliasOf: IdNumberClass<object> | null

    The ID type this one is an alias of, like Python's alias_of; null for an ID type that is not an alias. Every built-in ID type sets null: aliases such as SVN.EMSO are the same object as the ID type they name.

    checksum: boolean

    Whether the ID has a checksum function

    checksumAlgorithm?: string

    Human-readable checksum algorithm description (e.g. "Luhn (mod 10)" or "None (...)")

    countryName?: string

    English country name (e.g. 'Hungary')

    deprecated: boolean

    Whether this ID type is deprecated

    displayFormat?: string

    Human-readable display format string (e.g. "YYMMDD-GSSSSSS")

    example?: string

    A synthetic, checksum-valid example ID (passes validateNationalId)

    idType?: string

    English name of the ID document (e.g. 'Personal ID Number')

    iso3166Alpha2: string

    ISO 3166-1 alpha-2 country code

    links: string[]

    Reference links

    masks?: readonly string[]

    Input masks for the ID (#129), one per compact length it comes in, e.g. ['##.###.###-X', '#.###.###-X'] for Chile. Each character is a token or a separator:

    • #: a digit
    • L: a letter
    • X: a letter or a digit
    • *: any character except whitespace, e.g. Finland's century sign (-, +, or a letter)
    • anything else ( . - / ( )): a separator that formatId() inserts and normalizeId() removes.
    maxLength: number

    Maximum length without insignificant characters

    minLength: number

    Minimum length without insignificant characters

    names: string[]

    Common names for this ID type

    officialName?: string

    Official/local name of the ID (e.g. "Personnummer")

    parsable: boolean

    Whether the ID has a parse function

    regexp: RegExp

    Regular expression to validate the ID