Anyone aware of way to get to convert a country co...
# compose-web
j
Anyone aware of way to get to convert a country code to a name in a Wasm based Compose for Web app?
j
Thanks, will try that
👍 1
that worked, thanks!
Copy code
@JsFun(
    """ (countryCode) => {
        const regionNames = new Intl.DisplayNames(['en'], {type: 'region'});        
        return regionNames.of(countryCode)
    }
"""
)
external fun getCountryName(countryCode: String): String
👍 2
much better now 🙂