1.0.1 • Published 3 years ago
list-of-countries v1.0.1
What is this?
Get list of countries with data you need.
Installation
npm install list-of-countries
Then...
import { getCountries } from 'list-of-countries';
getCountries(['name', 'flag']);
Options
You can get countries data in two ways:
getCountries(); (Gets all country data)
getCountries('name', 'capital', 'population'); (Gets specified fields)
For available fields see REST Countries API documentation.