page.mjs

1/** Check if content looks like a full page (not a component/partial) */
2function isFullPage(content) {
3  const stripped = content.replace(/<!--[\s\S]*?-->/g, '');
4  return /<!doctype\s|<html[\s>]|<head[\s>]/i.test(stripped);
5}
6
7export { isFullPage };