WEB-581 Remove the hyphens (#2998)
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
export function formatTabLabel(label: string): string {
|
||||
if (!label) return '';
|
||||
return label
|
||||
.replace(/[-_]+/g, ' ')
|
||||
.split(' ')
|
||||
.map((word) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase())
|
||||
.join(' ');
|
||||
}
|
||||
Reference in New Issue
Block a user