Skip to content

Latest commit

 

History

History
39 lines (24 loc) · 896 Bytes

File metadata and controls

39 lines (24 loc) · 896 Bytes

@scaleway/countries

ISO 3166/3166-2 coutries JSON database

This package only holds and publish json files


Install

$ pnpm add @scaleway/countries

Usage

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" }, ... ]

Generation

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