has-alt-evaluate.js 244 B

12345678910
  1. function hasAltEvaluate(node, options, virtualNode) {
  2. const { nodeName } = virtualNode.props;
  3. if (!['img', 'input', 'area'].includes(nodeName)) {
  4. return false;
  5. }
  6. return virtualNode.hasAttr('alt');
  7. }
  8. export default hasAltEvaluate;