a.js 402 B

1234567891011121314151617
  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. }
  16. module.exports = exports.default;