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

    Module countryData

    Compact ISO 3166-1 alpha-2 country table: the English name and primary currency code for each country, and nothing else.

    It replaces the runtime country-list-js dependency, which carries provinces, capitals, phone codes and more (~140 kB) for the two fields ChemPal reads. The library is kept as a dev dependency purely so src/constants/__tests__/countryData.test.ts can fail if this table ever drifts from it. Regenerate by re-running the extraction described there.

    export const COUNTRY_DATA: Readonly<Record<string, readonly [name: string, currency: string]>> = {
    AD: ['Andorra', 'EUR'],
    AE: ['United Arab Emirates', 'AED'],
    AF: ['Afghanistan', 'AFN'],
    AG: ['Antigua and Barbuda', 'XCD'],
    AI: ['Anguilla', 'XCD'],
    AL: ['Albania', 'ALL'],
    AM: ['Armenia', 'AMD'],
    AO: ['Angola', 'AOA'],
    AQ: ['Antarctica', 'XCD'],
    AR: ['Argentina', 'ARS'],
    AS: ['American Samoa', 'USD'],
    AT: ['Austria', 'EUR'],
    AU: ['Australia', 'AUD'],
    AW: ['Aruba', 'AWG'],
    AX: ['Aland Islands', 'EUR'],
    AZ: ['Azerbaijan', 'AZN'],
    BA: ['Bosnia and Herzegovina', 'BAM'],
    BB: ['Barbados', 'BBD'],
    BD: ['Bangladesh', 'BDT'],
    BE: ['Belgium', 'EUR'],
    BF: ['Burkina Faso', 'XOF'],
    BG: ['Bulgaria', 'BGN'],
    BH: ['Bahrain', 'BHD'],
    BI: ['Burundi', 'BIF'],
    BJ: ['Benin', 'XOF'],
    BL: ['Saint Barthelemy', 'EUR'],
    BM: ['Bermuda', 'BMD'],
    BN: ['Brunei', 'BND'],
    BO: ['Bolivia', 'BOB'],
    BQ: ['Bonaire, Saint Eustatius and Saba ', 'USD'],
    BR: ['Brazil', 'BRL'],
    BS: ['Bahamas', 'BSD'],
    BT: ['Bhutan', 'BTN'],
    BV: ['Bouvet Island', 'NOK'],
    BW: ['Botswana', 'BWP'],
    BY: ['Belarus', 'BYR'],
    BZ: ['Belize', 'BZD'],
    CA: ['Canada', 'CAD'],
    CC: ['Cocos Islands', 'AUD'],
    CD: ['Democratic Republic of the Congo', 'CDF'],
    CF: ['Central African Republic', 'XAF'],
    CG: ['Republic of the Congo', 'XAF'],
    CH: ['Switzerland', 'CHF'],
    CI: ['Ivory Coast', 'XOF'],
    CK: ['Cook Islands', 'NZD'],
    CL: ['Chile', 'CLP'],
    CM: ['Cameroon', 'XAF'],
    CN: ['China', 'CNY'],
    CO: ['Colombia', 'COP'],
    CR: ['Costa Rica', 'CRC'],
    CU: ['Cuba', 'CUP'],
    CV: ['Cape Verde', 'CVE'],
    CW: ['Curacao', 'ANG'],
    CX: ['Christmas Island', 'AUD'],
    CY: ['Cyprus', 'EUR'],
    CZ: ['Czech Republic', 'CZK'],
    DE: ['Germany', 'EUR'],
    DJ: ['Djibouti', 'DJF'],
    DK: ['Denmark', 'DKK'],
    DM: ['Dominica', 'XCD'],
    DO: ['Dominican Republic', 'DOP'],
    DZ: ['Algeria', 'DZD'],
    EC: ['Ecuador', 'USD'],
    EE: ['Estonia', 'EUR'],
    EG: ['Egypt', 'EGP'],
    EH: ['Western Sahara', 'MAD'],
    ER: ['Eritrea', 'ERN'],
    ES: ['Spain', 'EUR'],
    ET: ['Ethiopia', 'ETB'],
    FI: ['Finland', 'EUR'],
    FJ: ['Fiji', 'FJD'],
    FK: ['Falkland Islands', 'FKP'],
    FM: ['Micronesia', 'USD'],
    FO: ['Faroe Islands', 'DKK'],
    FR: ['France', 'EUR'],
    GA: ['Gabon', 'XAF'],
    GB: ['United Kingdom', 'GBP'],
    GD: ['Grenada', 'XCD'],
    GE: ['Georgia', 'GEL'],
    GF: ['French Guiana', 'EUR'],
    GG: ['Guernsey', 'GBP'],
    GH: ['Ghana', 'GHS'],
    GI: ['Gibraltar', 'GIP'],
    GL: ['Greenland', 'DKK'],
    GM: ['Gambia', 'GMD'],
    GN: ['Guinea', 'GNF'],
    GP: ['Guadeloupe', 'EUR'],
    GQ: ['Equatorial Guinea', 'XAF'],
    GR: ['Greece', 'EUR'],
    GS: ['South Georgia and the South Sandwich Islands', 'GBP'],
    GT: ['Guatemala', 'GTQ'],
    GU: ['Guam', 'USD'],
    GW: ['Guinea-Bissau', 'XOF'],
    GY: ['Guyana', 'GYD'],
    HK: ['Hong Kong', 'HKD'],
    HM: ['Heard Island and McDonald Islands', 'AUD'],
    HN: ['Honduras', 'HNL'],
    HR: ['Croatia', 'HRK'],
    HT: ['Haiti', 'HTG'],
    HU: ['Hungary', 'HUF'],
    ID: ['Indonesia', 'IDR'],
    IE: ['Ireland', 'EUR'],
    IL: ['Israel', 'ILS'],
    IM: ['Isle of Man', 'GBP'],
    IN: ['India', 'INR'],
    IO: ['British Indian Ocean Territory', 'USD'],
    IQ: ['Iraq', 'IQD'],
    IR: ['Iran', 'IRR'],
    IS: ['Iceland', 'ISK'],
    IT: ['Italy', 'EUR'],
    JE: ['Jersey', 'GBP'],
    JM: ['Jamaica', 'JMD'],
    JO: ['Jordan', 'JOD'],
    JP: ['Japan', 'JPY'],
    KE: ['Kenya', 'KES'],
    KG: ['Kyrgyzstan', 'KGS'],
    KH: ['Cambodia', 'KHR'],
    KI: ['Kiribati', 'AUD'],
    KM: ['Comoros', 'KMF'],
    KN: ['Saint Kitts and Nevis', 'XCD'],
    KP: ['North Korea', 'KPW'],
    KR: ['South Korea', 'KRW'],
    KW: ['Kuwait', 'KWD'],
    KY: ['Cayman Islands', 'KYD'],
    KZ: ['Kazakhstan', 'KZT'],
    LA: ['Laos', 'LAK'],
    LB: ['Lebanon', 'LBP'],
    LC: ['Saint Lucia', 'XCD'],
    LI: ['Liechtenstein', 'CHF'],
    LK: ['Sri Lanka', 'LKR'],
    LR: ['Liberia', 'LRD'],
    LS: ['Lesotho', 'LSL'],
    LT: ['Lithuania', 'LTL'],
    LU: ['Luxembourg', 'EUR'],
    LV: ['Latvia', 'EUR'],
    LY: ['Libya', 'LYD'],
    MA: ['Morocco', 'MAD'],
    MC: ['Monaco', 'EUR'],
    MD: ['Moldova', 'MDL'],
    ME: ['Montenegro', 'EUR'],
    MF: ['Saint Martin', 'EUR'],
    MG: ['Madagascar', 'MGA'],
    MH: ['Marshall Islands', 'USD'],
    MK: ['Macedonia', 'MKD'],
    ML: ['Mali', 'XOF'],
    MM: ['Myanmar', 'MMK'],
    MN: ['Mongolia', 'MNT'],
    MO: ['Macao', 'MOP'],
    MP: ['Northern Mariana Islands', 'USD'],
    MQ: ['Martinique', 'EUR'],
    MR: ['Mauritania', 'MRO'],
    MS: ['Montserrat', 'XCD'],
    MT: ['Malta', 'EUR'],
    MU: ['Mauritius', 'MUR'],
    MV: ['Maldives', 'MVR'],
    MW: ['Malawi', 'MWK'],
    MX: ['Mexico', 'MXN'],
    MY: ['Malaysia', 'MYR'],
    MZ: ['Mozambique', 'MZN'],
    NA: ['Namibia', 'NAD'],
    NC: ['New Caledonia', 'XPF'],
    NE: ['Niger', 'XOF'],
    NF: ['Norfolk Island', 'AUD'],
    NG: ['Nigeria', 'NGN'],
    NI: ['Nicaragua', 'NIO'],
    NL: ['Netherlands', 'EUR'],
    NO: ['Norway', 'NOK'],
    NP: ['Nepal', 'NPR'],
    NR: ['Nauru', 'AUD'],
    NU: ['Niue', 'NZD'],
    NZ: ['New Zealand', 'NZD'],
    OM: ['Oman', 'OMR'],
    PA: ['Panama', 'PAB'],
    PE: ['Peru', 'PEN'],
    PF: ['French Polynesia', 'XPF'],
    PG: ['Papua New Guinea', 'PGK'],
    PH: ['Philippines', 'PHP'],
    PK: ['Pakistan', 'PKR'],
    PL: ['Poland', 'PLN'],
    PM: ['Saint Pierre and Miquelon', 'EUR'],
    PN: ['Pitcairn', 'NZD'],
    PR: ['Puerto Rico', 'USD'],
    PS: ['Palestinian Territory', 'ILS'],
    PT: ['Portugal', 'EUR'],
    PW: ['Palau', 'USD'],
    PY: ['Paraguay', 'PYG'],
    QA: ['Qatar', 'QAR'],
    RE: ['Reunion', 'EUR'],
    RO: ['Romania', 'RON'],
    RS: ['Serbia', 'RSD'],
    RU: ['Russia', 'RUB'],
    RW: ['Rwanda', 'RWF'],
    SA: ['Saudi Arabia', 'SAR'],
    SB: ['Solomon Islands', 'SBD'],
    SC: ['Seychelles', 'SCR'],
    SD: ['Sudan', 'SDG'],
    SE: ['Sweden', 'SEK'],
    SG: ['Singapore', 'SGD'],
    SH: ['Saint Helena', 'SHP'],
    SI: ['Slovenia', 'EUR'],
    SJ: ['Svalbard and Jan Mayen', 'NOK'],
    SK: ['Slovakia', 'EUR'],
    SL: ['Sierra Leone', 'SLL'],
    SM: ['San Marino', 'EUR'],
    SN: ['Senegal', 'XOF'],
    SO: ['Somalia', 'SOS'],
    SR: ['Suriname', 'SRD'],
    SS: ['South Sudan', 'SSP'],
    ST: ['Sao Tome and Principe', 'STD'],
    SV: ['El Salvador', 'USD'],
    SX: ['Sint Maarten', 'ANG'],
    SY: ['Syria', 'SYP'],
    SZ: ['Swaziland', 'SZL'],
    TC: ['Turks and Caicos Islands', 'USD'],
    TD: ['Chad', 'XAF'],
    TF: ['French Southern Territories', 'EUR'],
    TG: ['Togo', 'XOF'],
    TH: ['Thailand', 'THB'],
    TJ: ['Tajikistan', 'TJS'],
    TK: ['Tokelau', 'NZD'],
    TL: ['East Timor', 'USD'],
    TM: ['Turkmenistan', 'TMT'],
    TN: ['Tunisia', 'TND'],
    TO: ['Tonga', 'TOP'],
    TR: ['Turkey', 'TRY'],
    TT: ['Trinidad and Tobago', 'TTD'],
    TV: ['Tuvalu', 'AUD'],
    TW: ['Taiwan', 'TWD'],
    TZ: ['Tanzania', 'TZS'],
    UA: ['Ukraine', 'UAH'],
    UG: ['Uganda', 'UGX'],
    UM: ['United States Minor Outlying Islands', 'USD'],
    US: ['United States', 'USD'],
    UY: ['Uruguay', 'UYU'],
    UZ: ['Uzbekistan', 'UZS'],
    VA: ['Vatican', 'EUR'],
    VC: ['Saint Vincent and the Grenadines', 'XCD'],
    VE: ['Venezuela', 'VEF'],
    VG: ['British Virgin Islands', 'USD'],
    VI: ['U.S. Virgin Islands', 'USD'],
    VN: ['Vietnam', 'VND'],
    VU: ['Vanuatu', 'VUV'],
    WF: ['Wallis and Futuna', 'XPF'],
    WS: ['Samoa', 'WST'],
    XK: ['Kosovo', 'EUR'],
    YE: ['Yemen', 'YER'],
    YT: ['Mayotte', 'EUR'],
    ZA: ['South Africa', 'ZAR'],
    ZM: ['Zambia', 'ZMK'],
    ZW: ['Zimbabwe', 'ZWL'],
    };

    Constants - Constants

    COUNTRY_DATA

    [name, currency] per country, keyed by ISO 3166-1 alpha-2 code. currency is the ISO 4217 code of the country's primary currency (e.g. "EUR").