Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
new Promise((resolve, reject) => {
try {
const Cldr = require('cldrjs');
Cldr.load(require('cldr-core/supplemental/likelySubtags'));
// Load all bundles
for (locale of require('cldr-core/availableLocales').availableLocales.modern) {
Cldr.load(require(`cldr-localenames-modern/main/${locale}/languages`))
}
resolve(new CldrLanguages(Cldr))
} catch (err) {
reject(err)
}
});