Merge branch 'develop' into fix/cw-4085

This commit is contained in:
Sivin Varghese
2025-09-25 17:04:19 +05:30
committed by GitHub
962 changed files with 46302 additions and 1802 deletions
@@ -78,3 +78,18 @@ export const sanitizeVariableSearchKey = (searchKey = '') => {
.replace(/,/g, '') // remove commas
.trim();
};
/**
* Convert underscore-separated string to title case.
* Eg. "round_robin" => "Round Robin"
* @param {string} str
* @returns {string}
*/
export const formatToTitleCase = str => {
return (
str
?.replace(/_/g, ' ')
.replace(/\b\w/g, l => l.toUpperCase())
.trim() || ''
);
};