A comprehensive dataset of countries, languages, and continents with ISO 3166-1, ISO 639-1, and ISO 4217 codes. Includes names, native names, capitals, currencies, phone codes, and emoji flags. Version 3.3.0 ships TypeScript definitions, ESM and CJS builds. Updated regularly via community contributions. Differentiators: strong typing, multiple formats (JSON, CSV, SQL), minimal subset exports, and utility functions for lookups.
npm install countries-listNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates importing countries and getEmojiFlag, iterating over the data, and writing a JSON file.
Update code to handle phone as array, e.g., country.phone[0] for primary code.
Use import from 'countries-list/minimal/countries.2to3.min.json' etc.
Always validate country code before calling getEmojiFlag.
Run 'npm install countries-list' and use correct import: 'import { countries } from 'countries-list''Ensure you use v3 data and access phone as array: country.phone[0] or country.phone.join(', ').Ensure package.json 'main' points to cjs/index.js and 'module' to mjs/index.js. For webpack, add resolve.alias or use explicit path.
No dependency data recorded yet.