ISO 3166/3166-2 coutries JSON database
This package only holds and publish json files
$ pnpm add @scaleway/countries
import countries from '@scaleway/countries'
import frenchSubdivisions from '@scaleway/countries/subdivisions/FR'
console.log(countries) // => [{ "name": "Afghanistan", "dial_code": "+93", "code": "AF", "flag": "🇦🇫" }, ...]
console.log(frenchSubdivisions) // => [{ "code": "FR-01", "country_code": "FR", "name": "Ain", "parent_code": "FR-ARA", "type": "Metropolitan department" }, ... ]
This package is generated manually from a pypi library pycountry
To update the database, first make sure that you have:
And then:
$ pnpm run generate