const fetch = require("node-fetch")
module.exports = {
country: async function country(country) {
const api = await fetch(`https://disease.sh/v3/covid-19/countries/${country}`)
const data = await api.json()
if (!data) throw new Error("No data was returned");
return data
}
}