Fetches the canonical ISO 3166-1 country codes from ISO's website and writes to a CSV file.
If your only interest is to get the CSV file, you can check takuma7/iso-3166-1-csv
out.
Installation:
pnpm add --global get-country-codes
Usage:
get-country-codes -o ./out/iso-3166-1.csv # You can specify the output path (default: ./iso-3166-1.csv)
Gets the country codes table from the ISO website.
getTable(): Promise<{ headers: string[]; rows: string[][] }>
Usage:
const { headers, rows } = await getTable()