Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
countries-list-es5
Advanced tools
Continents & countries: ISO 3166-1 alpha-2 code, name, ISO 639-1 languages, capital and currency, native name, calling codes. Available in JSON, CSV and SQL formats.
Continents & countries: ISO 3166-1 alpha-2 code, name, ISO 639-1 languages, capital and currency, native name, calling codes. Lists are available in JSON, CSV and SQL formats. Also, contains separate JSON files with additional country Emoji flags data.
This version changes a lot in the data structures, and placement of the files.
So, if your projects depend on the old structure — specify previous versions, <2.0.0
.
Package is available via:
npm install countries-list
composer require tranvansang/countries-list
bower install countries
Module exports continents
, countries
, languages
, languagesAll
and functions:
getEmojiFlag(countryCode)
, where countryCode
is alpha-2 String
getUnicode(emoji)
, where emoji
is alpha-2 emoji flag String
Built files are in the ./dist
directory.
The ./data
directory contains source data.
The consistent data is available from ./dist/data.*
files (JSON, SQL).
Note: ES5 UMD build is here: ./dist/index.es5.min.js
.
Note: Country item languages
field is an Array
in JSON files to easily count and match items with a Language item.
But currency
and phone
calling codes may be a comma-separated String
.
Note: Languages list only contains languages used in Countries data. Full list of known languages is exported as languagesAll
from ./dist/languages.all.json
.
{
"continents": {
"AF": "Africa",
"AN": "Antarctica",
"AS": "Asia",
"EU": "Europe",
"NA": "North America",
"OC": "Oceania",
"SA": "South America"
},
"countries": {
"AE": {
"name": "United Arab Emirates",
"native": "دولة الإمارات العربية المتحدة",
"phone": "971",
"continent": "AS",
"capital": "Abu Dhabi",
"currency": "AED",
"languages": [
"ar"
],
"emoji": "🇦🇪",
"emojiU": "U+1F1E6 U+1F1EA"
},
...
"UA": {
"name": "Ukraine",
"native": "Україна",
"phone": "380",
"continent": "EU",
"capital": "Kyiv",
"currency": "UAH",
"languages": [
"uk"
],
"emoji": "🇺🇦",
"emojiU": "U+1F1FA U+1F1E6"
}
},
"languages": {
"ar": {
"name": "Arabic",
"native": "العربية",
"rtl": 1
},
...
"uk": {
"name": "Ukrainian",
"native": "Українська"
}
}
}
Everything is generated from files in ./data
, including SQL file.
Everything in ./dist
is generated,
so please make data related changes ONLY to files from ./data
and then run gulp
default command to commit generated files as well.
Prepared by Annexare Studio from different public sources. Feel free to use it as you need in your apps or send updates into this public repository. It's under MIT license.
FAQs
Continents & countries: ISO 3166-1 alpha-2 code, name, ISO 639-1 languages, capital and currency, native name, calling codes. Available in JSON, CSV and SQL formats.
The npm package countries-list-es5 receives a total of 1 weekly downloads. As such, countries-list-es5 popularity was classified as not popular.
We found that countries-list-es5 demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.