Gathering detailed insights and metrics for country-emoji
Gathering detailed insights and metrics for country-emoji
Gathering detailed insights and metrics for country-emoji
Gathering detailed insights and metrics for country-emoji
Converts between country names, ISO 3166-1 codes and flag emojis.
npm install country-emoji
Typescript
Module System
Node Version
NPM Version
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
88 Stars
154 Commits
19 Forks
3 Watchers
6 Branches
13 Contributors
Updated on Jul 10, 2025
Latest Version
1.5.6
Package Id
country-emoji@1.5.6
Size
8.66 kB
NPM Version
6.14.11
Node Version
12.21.0
Published on
Mar 21, 2021
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
7
Converts between country names, ISO 3166-1 codes and flag emojis. Has zero dependencies.
$ npm install --save country-emoji
1const {flag, code, name, countries} = require('country-emoji'); 2 3flag('CL') 4 // ~> ???????? 5 6code('????????') 7 // ~> CA 8 9name('????????') 10 // ~> Qatar 11 12// can extract name from string… 13flag('Taiwan number one!') 14 // ~> ???????? 15 16// …but only if there's no ambiguity 17flag('Congo and Burma') 18 // ~> undefined 19 20flag('Republic of Tanzania') 21 // ~> ???????? 22 23flag('Tanzania, United Republic of') 24 // ~> ???????? 25 26code('Australia') 27 // ~> AU 28 29code('UAE') 30 // ~> AE 31 32name('AE') 33 // ~> United Arab Emirates 34 35code('UK') 36 // ~> GB 37 38// all values can be converted back and forth indefinitely 39flag(name(flag(code(flag(name('NZ')))))) 40 // ~> ???????? 41 42 // a dictionary (of country code to country name) of all countries 43Object.keys(countries).join(", ") 44 // ~> AD, AE, AF, AG, AI, AL, AM, AN, AO, AQ, AR, AS, AT, AU, AW, AX, AZ, BA, BB, BD, BE, BF, BG, BH, BI, BJ, BM, BN, BO, BR, BS, BT, BV, BW, BY, BZ, CA, CC, CD, CF, CG, CH, CI, CK, CL, CM, CN, CO, CR, CU, CV, CX, CY, CZ, DE, DJ, DK, DM, DO, DZ, EC, EE, EG, EH, ER, ES, ET, EU, FI, FJ, FK, FM, FO, FR, GA, GB, GD, GE, GF, GG, GH, GI, GL, GM, GN, GP, GQ, GR, GS, GT, GU, GW, GY, HK, HM, HN, HR, HT, HU, ID, IE, IL, IM, IN, IO, IQ, IR, IS, IT, JE, JM, JO, JP, KE, KG, KH, KI, KM, KN, KP, KR, KW, KY, KZ, LA, LB, LC, LI, LK, LR, LS, LT, LU, LV, LY, MA, MC, MD, ME, MG, MH, MK, ML, MM, MN, MO, MP, MQ, MR, MS, MT, MU, MV, MW, MX, MY, MZ, NA, NC, NE, NF, NG, NI, NL, NO, NP, NR, NU, NZ, OM, PA, PE, PF, PG, PH, PK, PL, PM, PN, PR, PS, PT, PW, PY, QA, RE, RO, RS, RU, RW, SA, SB, SC, SD, SE, SG, SH, SI, SJ, SK, SL, SM, SN, SO, SR, ST, SV, SY, SZ, TC, TD, TF, TG, TH, TJ, TK, TL, TM, TN, TO, TR, TT, TV, TW, TZ, UA, UG, UM, US, UY, UZ, VA, VC, VE, VG, VI, VN, VU, WF, WS, XK, YE, YT, ZA, ZM, ZW 45
Check out the following:
PS. Happy to add more here :).
If you discover a bug please report it here. Express gratitude here.
Mail me at bugs@meedamian.com, or on twitter @meeDamian.
MIT @ Damian Mee
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
Reason
packaging workflow detected
Details
Reason
3 existing vulnerabilities detected
Details
Reason
dependency not pinned by hash detected -- score normalized to 4
Details
Reason
Found 0/8 approved changesets -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn Morecountry-code-emoji
convert country codes (ISO 3166-1 alpha-2) to corresponding emoji flags (unicode regional indicator symbols)
country-flag-emoji-polyfill
Add country flag emojis to Chromium-based browsers on Windows
react-country-flag
> React component for emoji/svg country flags.
country-locale-map
Provides mapping between country codes and provides default country locales. Includes optional fuzzy matching for country name.