mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-20 05:22:02 +00:00
feat(FE): Add formatTitleCaseGeneral helper and update usage
This commit is contained in:
@@ -45,6 +45,15 @@ export const formatTitleCase = (value: string) => {
|
||||
.join(' ');
|
||||
};
|
||||
|
||||
export const formatTitleCaseGeneral = (value: string) => {
|
||||
return value
|
||||
.toLowerCase()
|
||||
.replace(/_/g, ' ')
|
||||
.split(' ')
|
||||
.map((word) => word.charAt(0).toUpperCase() + word.slice(1))
|
||||
.join(' ');
|
||||
};
|
||||
|
||||
export function formatVechicleNumber(value: string): string {
|
||||
let result = '';
|
||||
for (let i = 0; i < (value?.length ?? 0); i++) {
|
||||
|
||||
Reference in New Issue
Block a user