get region and continent names by code in JS?

Using Intl object in js, I can get localized country names with iso code. That’s great, but I need also region names and continents; like Europe, South Asia, Northern Afrika etc.

All this regions have UN M49 codes that are supposed to supported in Intl object, but they are not or maybe I’m doing something wrong. Some codes work, and some don’t. So I’m confused.

Is there a way to check all available region names in Intl?

Or does enyone know an alternative to get localized region and continent names by code?

const regions = new Intl.DisplayNames(['en'], { type: 'region' })

console.log(regions.of('150'))
console.log(regions.of('419'))


I would expect code ‘150’ to log Europe – because that’s the code for Europe – but it doesn’t. While for example, if I try ‘419’, it logs Latin America, as it should.