"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.hasText = void 0;
var parser;

if (typeof window !== 'undefined') {
  parser = new DOMParser();
}

var markupToText = function markupToText(s) {
  var root = parser.parseFromString(s, 'text/html');
  return root.body.textContent;
};

var hasText = function hasText(s) {
  if (!s) {
    return false;
  }

  var tc = markupToText(s);
  return !!(tc && tc.trim());
};

exports.hasText = hasText;
//# sourceMappingURL=has-text.js.map