get-country-codes
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

get-country-codes

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.

CLI

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)

API

getTable

Gets the country codes table from the ISO website.

getTable(): Promise<{ headers: string[]; rows: string[][] }>

Usage:

const { headers, rows } = await getTable()

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.2
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.2
    1
  • 0.0.1
    0
  • 0.0.0
    0

Package Sidebar

Install

npm i get-country-codes

Weekly Downloads

1

Version

0.0.2

License

MIT

Unpacked Size

88.2 kB

Total Files

16

Last publish

Collaborators

  • takuma7