Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
extractFields: function(locale) {
return cldr.extractFields(locale);
}
function extractFields(locale, fieldNames) {
assert(isValidLocale(locale), 'Invalid locale');
var fields = cldr.extractFields(normalize(locale));
if (fieldNames) {
fields = fieldNames.reduce(function (filteredFields, fieldName) {
filteredFields[fieldName] = fields[fieldName];
return filteredFields;
}, {});
}
if (!Object.keys(fields).length) {
return null;
}
return fields;
}
extractFields: function(locale) {
return cldr.extractFields(locale);
},