You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I presume this is because it is trying to match "Russian Federation". However, it would be nice if this library took into consideration the alternative names too.
The text was updated successfully, but these errors were encountered:
I have written a simple local abstraction, it would be nice to have a version of this supported by this library:
// @flowimport{// eslint-disable-next-line id-matchgetAlpha2CodeasgetCountryAlpha2Code,}from'i18n-iso-countries';/** * Country name map based on IMDb, e.g. * https://www.imdb.com/title/tt6303866/releaseinfo */constcountryNameMap={RUSSIA: 'RU',UK: 'GB',USA: 'US',};exportdefault(subject: string): string|null=>{constcountryCode=getCountryAlpha2Code(subject,'en');if(countryCode){returncountryCode.toUpperCase();}returncountryNameMap[subject.toUpperCase()]||null;};
I presume this is because it is trying to match "Russian Federation". However, it would be nice if this library took into consideration the alternative names too.
The text was updated successfully, but these errors were encountered: