Gathering detailed insights and metrics for countries-list
Gathering detailed insights and metrics for countries-list
Gathering detailed insights and metrics for countries-list
Gathering detailed insights and metrics for countries-list
world-countries
List of world countries in JSON, CSV, XML and YAML
country-list
Maps ISO 3166-1-alpha-2 codes to English country names and vice versa.
countries-list-as-georgian
Countries list with flags ( English/Georgian )
country-codes-list
List of codes per country (languages, calling codes, currency codes, etc) with full TypeScript support.
Countries, Languages & Continents data (capital and currency, native name, calling codes).
npm install countries-list
Typescript
Module System
Node Version
NPM Version
99.9
Supply Chain
100
Quality
77.1
Maintenance
100
Vulnerability
100
License
Improve `getCountryCode()`
Updated on Jul 31, 2024
Update data & types (new `partOf`, `userAssigned` params for countries)
Updated on Mar 04, 2024
v3.0.6
Updated on Oct 20, 2023
v3.0.5
Updated on Sep 29, 2023
v3.0.1
Updated on Sep 29, 2023
v3.0: ESM, TypeScript, Turborepo and country data updates
Updated on Sep 12, 2023
TypeScript (97.75%)
PHP (2.17%)
Shell (0.07%)
Total Downloads
33,486,807
Last Day
56,657
Last Week
265,685
Last Month
1,230,314
Last Year
11,113,441
MIT License
1,233 Stars
206 Commits
429 Forks
17 Watchers
2 Branches
14 Contributors
Updated on Apr 20, 2025
Minified
Minified + Gzipped
Latest Version
3.1.1
Package Id
countries-list@3.1.1
Unpacked Size
265.64 kB
Size
82.49 kB
File Count
24
NPM Version
10.7.0
Node Version
20.14.0
Published on
Jul 31, 2024
Cumulative downloads
Total Downloads
Last Day
-1.1%
56,657
Compared to previous day
Last Week
-8.4%
265,685
Compared to previous week
Last Month
1.4%
1,230,314
Compared to previous month
Last Year
41.8%
11,113,441
Compared to previous year
No dependencies detected.
Continents & countries: ISO 3166-1 alpha-2 code (with alpha-2 to alpha-3 set), name, ISO 639-1 languages, capital and ISO 4217 currency codes, native name, calling codes. Lists are available in JSON, CSV and SQL formats. Also, contains separate JSON files with additional country Emoji flags data.
Version 3 comes with some data structure changes. It was completely reworked under the hood with TypeScript, ESM exports and Turborepo file structure.
Everything is strongly typed so you can easily use data with auto-complete in your IDE.
Note: If your projects depend on the old structure, carefully specify required versions in your dependencies.
Package is available via:
npm install countries-list
composer require annexare/countries-list
Module exports continents
, countries
, languages
and utility functions.
1// Interfaces and types 2import type { 3 ICountry, 4 ICountryData, 5 ILanguage, 6 TContinentCode, 7 TCountryCode, 8 TLanguageCode, 9} from 'countries-list' 10 11// Main data and utils 12import { continents, countries, languages } from 'countries-list' 13// Utils 14import { getCountryCode, getCountryData, getCountryDataList, getEmojiFlag } from 'countries-list' 15 16// Minimal data in JSON 17import countries2to3 from 'countries-list/minimal/countries.2to3.min.json' 18import countries3to2 from 'countries-list/minimal/countries.3to2.min.json' 19import languageNames from 'countries-list/minimal/languages.native.min' 20 21getCountryCode('Ukraine') // 'UA' 22getCountryCode('Україна') // 'UA' 23getCountryData('UA') // ICountryData
Built files are in the dist
directory of this repository, and packages/countries
directory contains source data.
Note: JS build contains ES modules, CommonJS and IIFE (for now)
cjs/index.js
mjs/index.js
index.iife.js
1const continents = { 2 AF: 'Africa', 3 AN: 'Antarctica', 4 AS: 'Asia', 5 EU: 'Europe', 6 NA: 'North America', 7 OC: 'Oceania', 8 SA: 'South America', 9} 10 11const countries = { 12 // ... 13 UA: { 14 name: 'Ukraine', 15 native: 'Україна', 16 phone: [380], 17 continent: 'EU', 18 capital: 'Kyiv', 19 currency: ['UAH'], 20 languages: ['uk'], 21 }, 22 // ... 23} 24 25const languages = { 26 // ... 27 uk: { 28 name: 'Ukrainian', 29 native: 'Українська', 30 }, 31 ur: { 32 name: 'Urdu', 33 native: 'اردو', 34 rtl: 1, 35 }, 36 // ... 37}
Everything is generated from strongly typed files in packages/countries/src
, including SQL file.
Everything in dist
is generated,
so please make data related changes ONLY to files from packages/countries
, commit them.
Use npm run build
(or turbo build
, turbo test
) command to build/test generated files.
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.
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
6 existing vulnerabilities detected
Details
Reason
dependency not pinned by hash detected -- score normalized to 2
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 2/29 approved changesets -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
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
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-04-21
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 More