This commit is contained in:
Amruth Pillai
2026-01-26 06:38:59 +01:00
parent 49585940f7
commit 946bf9ec38
12 changed files with 59 additions and 17 deletions
+9
View File
@@ -58,3 +58,12 @@ export function generateRandomName() {
length: 3,
});
}
/**
* Strips HTML tags from a string and returns the text content.
* @param html - The HTML string to strip.
* @returns The text content without HTML tags.
*/
export function stripHtml(html: string) {
return html.replace(/<[^>]*>/g, "").trim();
}