This commit is contained in:
41666 2023-05-20 23:39:58 -04:00
parent 9dd0c78850
commit 49fffc20a3
19 changed files with 2551 additions and 12482 deletions

9
app/utils/strings.ts Normal file
View file

@ -0,0 +1,9 @@
export const toTitleCase = (str: string) => {
return str.replace(/\w\S*/g, (txt) => {
return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();
});
};
export const pascalCaseToTitleCase = (str: string) => {
return toTitleCase(str.replace(/([A-Z])/g, " $1"));
};