Get All Countries Information

The getAllCountries function allows you to get information about all available countries. You can specify the fields you want to retrieve as an array.

const { getAllCountries } = require('countrys-info');

// Get information about all countries
const allCountriesData = getAllCountries(['name_en', 'code_2']);
console.log(allCountriesData);

Last updated

Was this helpful?