mirror of
https://github.com/stefanpejcic/openpanel
synced 2025-06-26 18:28:26 +00:00
12 lines
407 B
TypeScript
12 lines
407 B
TypeScript
export const uppercaseFirstChar = (str: string): string => {
|
|
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
};
|
|
|
|
export const removeANSIColors = (str: string): string => {
|
|
return str.replace(
|
|
// biome-ignore lint/suspicious/noControlCharactersInRegex: we want to remove invisible characters here.
|
|
/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g,
|
|
"",
|
|
);
|
|
};
|