ChemPal Documentation - v1.18.0
    Preparing search index...

    Module helpers/country

    Functions - Country Helpers

    findCountryByIso2

    Looks up a country record by its two-letter ISO 3166-1 alpha-2 code. Codes are case-sensitive and upper-case, as in COUNTRY_DATA.

    getCountryName

    Resolves the full country name for a two-letter location code.

    findCountryByName

    Resolves a country's ISO 3166-1 alpha-2 code from its full English name. The input is title-cased first, and the match is exact against the table's names, so short aliases like "USA" are unknown (callers handle those separately).

    getUserCountryName

    Reads the user's selected country (full name) from persisted user settings. The country field is kept in sync with the location code by the settings reducer, so consumers that need a full country name can read it directly.

    Modules

    <internal>