frigate/web/src/utils/stringUtil.ts
Josh Hawkins 849d441c5c
Azure genai fixes (#14103)
* Azure fixes

* clarify docs

* sublabels fix
2024-10-01 16:05:16 -06:00

11 lines
295 B
TypeScript

export const capitalizeFirstLetter = (text: string): string => {
return text.charAt(0).toUpperCase() + text.slice(1);
};
export const capitalizeAll = (text: string): string => {
return text
.split(" ")
.map((word) => word.charAt(0).toUpperCase() + word.slice(1))
.join(" ");
};