has-text-content-evaluate.js 269 B

1234567891011
  1. import { sanitize, subtreeText } from '../../commons/text';
  2. function hasTextContentEvaluate(node, options, virtualNode) {
  3. try {
  4. return sanitize(subtreeText(virtualNode)) !== '';
  5. } catch (e) {
  6. return undefined;
  7. }
  8. }
  9. export default hasTextContentEvaluate;