a.js 371 B

12345678910111213141516171819
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports["default"] = getImplicitRoleForAnchor;
  6. var _jsxAstUtils = require("jsx-ast-utils");
  7. /**
  8. * Returns the implicit role for an anchor tag.
  9. */
  10. function getImplicitRoleForAnchor(attributes) {
  11. if ((0, _jsxAstUtils.getProp)(attributes, 'href')) {
  12. return 'link';
  13. }
  14. return '';
  15. }