escapeClassName.js 958 B

123456789101112131415161718192021222324
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. Object.defineProperty(exports, "default", {
  6. enumerable: true,
  7. get: function() {
  8. return escapeClassName;
  9. }
  10. });
  11. const _postcssselectorparser = /*#__PURE__*/ _interop_require_default(require("postcss-selector-parser"));
  12. const _escapeCommas = /*#__PURE__*/ _interop_require_default(require("./escapeCommas"));
  13. function _interop_require_default(obj) {
  14. return obj && obj.__esModule ? obj : {
  15. default: obj
  16. };
  17. }
  18. function escapeClassName(className) {
  19. var _node_raws;
  20. let node = _postcssselectorparser.default.className();
  21. node.value = className;
  22. var _node_raws_value;
  23. return (0, _escapeCommas.default)((_node_raws_value = node === null || node === void 0 ? void 0 : (_node_raws = node.raws) === null || _node_raws === void 0 ? void 0 : _node_raws.value) !== null && _node_raws_value !== void 0 ? _node_raws_value : node.value);
  24. }