list-of-countries
v1.0.1
Published
Returns list of countries from API
Downloads
29
Readme
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.