Download the PHP package annexare/countries-list without Composer
On this page you can find all versions of the php package annexare/countries-list. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download annexare/countries-list
More information about annexare/countries-list
Files in annexare/countries-list
Package countries-list
Short Description Continents & countries: ISO 3166-1 alpha-2 code, name, ISO 639-1 languages, capital, currency, native name, phone. JSON, CSV and SQL.
License MIT
Homepage http://annexare.github.io/Countries/
Informations about the package countries-list
Countries, Languages & Continents data
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.0: Breaking changes
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.
Installation
Package is available via:
- NPM
npm install countries-list
- Composer / Packagist
composer require annexare/countries-list
Usage (version 3.x)
Module exports continents
, countries
, languages
and utility functions.
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
cjs/index.js
- ESM
mjs/index.js
- IIFE
index.iife.js
Data structure examples
Contributing to this repository
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.
Credits
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.