UNPKG

vike

Version:

The Framework *You* Control - Next.js & Nuxt alternative for unprecedented flexibility and dependability.

10 lines (9 loc) 355 B
"use strict"; // Unit tests at ./isHtml.spec.ts Object.defineProperty(exports, "__esModule", { value: true }); exports.isHtml = isHtml; function isHtml(str) { // Copied and adapted from https://stackoverflow.com/questions/15458876/check-if-a-string-is-html-or-not/51325984#51325984 const re = /(<\/[^<]+>)|(<[^<]+\/>)/; return re.test(str); }