I'm using node-i18n-iso-countries and I want to override getNames function that takes 2 args so it can handle a new country name that I want to add.
Currently, I'm just doing it with an if-else statement this way:
let countryName = country === 'countryName' ? 'countryName'
: isoCountries.getName(code, lang);
Is there a more optimal way to do this? for example wrapping the isoCountries.getName function?
I'm new to TypeScript and function wrapping. So a reply with a snippet / an existing question might help please!