isDOMElement.js 754 B

1234567891011121314151617181920212223242526
  1. "use strict";
  2. var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
  3. Object.defineProperty(exports, "__esModule", {
  4. value: true
  5. });
  6. exports["default"] = void 0;
  7. var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
  8. var _ariaQuery = require("aria-query");
  9. var _arrayIncludes = _interopRequireDefault(require("array-includes"));
  10. var domElements = (0, _toConsumableArray2["default"])(_ariaQuery.dom.keys());
  11. /**
  12. * Returns boolean indicating whether the given element is a DOM element.
  13. */
  14. var isDOMElement = function isDOMElement(tagName) {
  15. return (0, _arrayIncludes["default"])(domElements, tagName);
  16. };
  17. var _default = isDOMElement;
  18. exports["default"] = _default;