mirror of
https://github.com/swissmakers/swiss-datashare.git
synced 2026-04-29 09:18:59 +02:00
11 lines
322 B
TypeScript
11 lines
322 B
TypeScript
|
|
export const configVariableToFriendlyName = (variable: string) => {
|
||
|
|
return variable
|
||
|
|
.split("_")
|
||
|
|
.map((word) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase())
|
||
|
|
.join(" ");
|
||
|
|
};
|
||
|
|
|
||
|
|
export const capitalizeFirstLetter = (string: string) => {
|
||
|
|
return string.charAt(0).toUpperCase() + string.slice(1);
|
||
|
|
};
|