added /dist
This commit is contained in:
Vendored
+22
@@ -0,0 +1,22 @@
|
||||
/**
|
||||
* Returns all configured locale codes.
|
||||
*/ export function getLocaleCodes(config) {
|
||||
return config.locales.map((locale)=>locale.code);
|
||||
}
|
||||
/**
|
||||
* Returns the default locale code.
|
||||
*/ export function getDefaultLocale(config) {
|
||||
return config.defaultLocale;
|
||||
}
|
||||
/**
|
||||
* Checks if a string is a valid configured locale code.
|
||||
*/ export function isValidLocale(code, config) {
|
||||
return config.locales.some((locale)=>locale.code === code);
|
||||
}
|
||||
/**
|
||||
* Returns the full locale definition for a given code, or undefined if not found.
|
||||
*/ export function getLocaleDefinition(code, config) {
|
||||
return config.locales.find((locale)=>locale.code === code);
|
||||
}
|
||||
|
||||
//# sourceMappingURL=helpers.js.map
|
||||
Reference in New Issue
Block a user