javascript 获取国家代码和Countires旗帜w.r.t国家代码
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了javascript 获取国家代码和Countires旗帜w.r.t国家代码相关的知识,希望对你有一定的参考价值。
{
BGN: "https://restcountries.eu/data/bgr.svg",
NOK: "https://restcountries.eu/data/nor.svg",
USD: "https://restcountries.eu/data/asm.svg",
BRL: "https://restcountries.eu/data/bra.svg",
GBP: "https://restcountries.eu/data/imn.svg",
RUB: "https://restcountries.eu/data/rus.svg",
RON: "https://restcountries.eu/data/rou.svg",
NZD: "https://restcountries.eu/data/cok.svg",
JPY: "https://restcountries.eu/data/jpn.svg",
DKK: "https://restcountries.eu/data/dnk.svg",
HRK: "https://restcountries.eu/data/hrv.svg",
HUF: "https://restcountries.eu/data/hun.svg",
HKD: "https://restcountries.eu/data/hkg.svg",
AUD: "https://restcountries.eu/data/aus.svg",
ILS: "https://restcountries.eu/data/isr.svg",
PHP: "https://restcountries.eu/data/phl.svg",
PLN: "https://restcountries.eu/data/pol.svg",
ZAR: "https://restcountries.eu/data/zaf.svg",
MYR: "https://restcountries.eu/data/mys.svg",
MXN: "https://restcountries.eu/data/mex.svg",
CHF: "https://restcountries.eu/data/lie.svg",
CNY: "https://restcountries.eu/data/chn.svg",
CAD: "https://restcountries.eu/data/can.svg",
CZK: "https://restcountries.eu/data/cze.svg",
KRW: "https://restcountries.eu/data/kor.svg",
SGD: "https://restcountries.eu/data/sgp.svg",
SEK: "https://restcountries.eu/data/swe.svg",
TRY: "https://restcountries.eu/data/tur.svg",
THB: "https://restcountries.eu/data/tha.svg",
INR: "https://restcountries.eu/data/ind.svg",
IDR: "https://restcountries.eu/data/idn.svg"
}
[
{ countryCode: "BG", currencyCode: "BGN" },
{ countryCode: "BV", currencyCode: "NOK" },
{ countryCode: "BQ", currencyCode: "USD" },
{ countryCode: "BR", currencyCode: "BRL" },
{ countryCode: "JE", currencyCode: "GBP" },
{ countryCode: "RU", currencyCode: "RUB" },
{ countryCode: "TL", currencyCode: "USD" },
{ countryCode: "RO", currencyCode: "RON" },
{ countryCode: "TK", currencyCode: "NZD" },
{ countryCode: "GU", currencyCode: "USD" },
{ countryCode: "GS", currencyCode: "GBP" },
{ countryCode: "JP", currencyCode: "JPY" },
{ countryCode: "GG", currencyCode: "GBP" },
{ countryCode: "GB", currencyCode: "GBP" },
{ countryCode: "SV", currencyCode: "USD" },
{ countryCode: "GL", currencyCode: "DKK" },
{ countryCode: "HR", currencyCode: "HRK" },
{ countryCode: "HU", currencyCode: "HUF" },
{ countryCode: "HK", currencyCode: "HKD" },
{ countryCode: "HM", currencyCode: "AUD" },
{ countryCode: "PR", currencyCode: "USD" },
{ countryCode: "PS", currencyCode: "ILS" },
{ countryCode: "PW", currencyCode: "USD" },
{ countryCode: "SJ", currencyCode: "NOK" },
{ countryCode: "PH", currencyCode: "PHP" },
{ countryCode: "PN", currencyCode: "NZD" },
{ countryCode: "PL", currencyCode: "PLN" },
{ countryCode: "ZA", currencyCode: "ZAR" },
{ countryCode: "EC", currencyCode: "USD" },
{ countryCode: "MH", currencyCode: "USD" },
{ countryCode: "MP", currencyCode: "USD" },
{ countryCode: "IM", currencyCode: "GBP" },
{ countryCode: "MY", currencyCode: "MYR" },
{ countryCode: "MX", currencyCode: "MXN" },
{ countryCode: "IL", currencyCode: "ILS" },
{ countryCode: "IO", currencyCode: "USD" },
{ countryCode: "FM", currencyCode: "USD" },
{ countryCode: "FO", currencyCode: "DKK" },
{ countryCode: "NO", currencyCode: "NOK" },
{ countryCode: "NF", currencyCode: "AUD" },
{ countryCode: "NZ", currencyCode: "NZD" },
{ countryCode: "NR", currencyCode: "AUD" },
{ countryCode: "NU", currencyCode: "NZD" },
{ countryCode: "CK", currencyCode: "NZD" },
{ countryCode: "CH", currencyCode: "CHF" },
{ countryCode: "CN", currencyCode: "CNY" },
{ countryCode: "CC", currencyCode: "AUD" },
{ countryCode: "CA", currencyCode: "CAD" },
{ countryCode: "CZ", currencyCode: "CZK" },
{ countryCode: "CX", currencyCode: "AUD" },
{ countryCode: "KI", currencyCode: "AUD" },
{ countryCode: "KR", currencyCode: "KRW" },
{ countryCode: "SG", currencyCode: "SGD" },
{ countryCode: "SE", currencyCode: "SEK" },
{ countryCode: "DK", currencyCode: "DKK" },
{ countryCode: "VG", currencyCode: "USD" },
{ countryCode: "US", currencyCode: "USD" },
{ countryCode: "UM", currencyCode: "USD" },
{ countryCode: "TV", currencyCode: "AUD" },
{ countryCode: "TR", currencyCode: "TRY" },
{ countryCode: "LI", currencyCode: "CHF" },
{ countryCode: "TH", currencyCode: "THB" },
{ countryCode: "TC", currencyCode: "USD" },
{ countryCode: "VI", currencyCode: "USD" },
{ countryCode: "AS", currencyCode: "USD" },
{ countryCode: "AU", currencyCode: "AUD" },
{ countryCode: "IN", currencyCode: "INR" },
{ countryCode: "ID", currencyCode: "IDR" }
]
[
'AUD',
'BGN',
'BRL',
'CAD',
'CHF',
'CNY',
'CZK',
'DKK',
'GBP',
'HKD',
'HRK',
'HUF',
'IDR',
'ILS',
'INR',
'JPY',
'KRW',
'MXN',
'MYR',
'NOK',
'NZD',
'PHP',
'PLN',
'RON',
'RUB',
'SEK',
'SGD',
'THB',
'TRY',
'ZAR',
'EUR',
]
// Get country codes & flag of countries with respect to country codes
const fetch = require("node-fetch");
const NEW_LINES = `\n\n`;
const EMOJIS = `${NEW_LINES}
以上是关于javascript 获取国家代码和Countires旗帜w.r.t国家代码的主要内容,如果未能解决你的问题,请参考以下文章