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()

    Install

    npm i get-country-codes

    DownloadsWeekly Downloads

    1

    Version

    0.0.2

    License

    MIT

    Unpacked Size

    88.2 kB

    Total Files

    16

    Last publish

    Collaborators

    • takuma7