isHtml function checks if a string contains HTML markup. It uses a regular expression to detect the presence of HTML tags in a string. The verification is case-insensitive and detects both opening and closing tags.ts
import { isHtml } from "@arkyn/shared";
string): The string to be verified.boolean): true if the string contains HTML markup, false otherwise.typescript
isHtml("<p>Hello world</p>"); // trueisHtml("<div>Content</div>"); // trueisHtml("Plain text"); // falseisHtml("Text with <b>bold</b>"); // trueisHtml(""); // false