source: trip-planner-front/node_modules/postcss-selector-parser/dist/selectors/className.js@ 571e0df

Last change on this file since 571e0df was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 2.2 KB
Line 
1"use strict";
2
3exports.__esModule = true;
4exports["default"] = void 0;
5
6var _cssesc = _interopRequireDefault(require("cssesc"));
7
8var _util = require("../util");
9
10var _node = _interopRequireDefault(require("./node"));
11
12var _types = require("./types");
13
14function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
15
16function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
17
18function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
19
20function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
21
22function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
23
24var ClassName = /*#__PURE__*/function (_Node) {
25 _inheritsLoose(ClassName, _Node);
26
27 function ClassName(opts) {
28 var _this;
29
30 _this = _Node.call(this, opts) || this;
31 _this.type = _types.CLASS;
32 _this._constructed = true;
33 return _this;
34 }
35
36 var _proto = ClassName.prototype;
37
38 _proto.valueToString = function valueToString() {
39 return '.' + _Node.prototype.valueToString.call(this);
40 };
41
42 _createClass(ClassName, [{
43 key: "value",
44 get: function get() {
45 return this._value;
46 },
47 set: function set(v) {
48 if (this._constructed) {
49 var escaped = (0, _cssesc["default"])(v, {
50 isIdentifier: true
51 });
52
53 if (escaped !== v) {
54 (0, _util.ensureObject)(this, "raws");
55 this.raws.value = escaped;
56 } else if (this.raws) {
57 delete this.raws.value;
58 }
59 }
60
61 this._value = v;
62 }
63 }]);
64
65 return ClassName;
66}(_node["default"]);
67
68exports["default"] = ClassName;
69module.exports = exports.default;
Note: See TracBrowser for help on using the repository browser.