source: trip-planner-front/node_modules/postcss-selector-parser/dist/selectors/root.js@ 188ee53

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

initial commit

  • Property mode set to 100644
File size: 2.0 KB
Line 
1"use strict";
2
3exports.__esModule = true;
4exports["default"] = void 0;
5
6var _container = _interopRequireDefault(require("./container"));
7
8var _types = require("./types");
9
10function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
11
12function _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); } }
13
14function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
15
16function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
17
18function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
19
20var Root = /*#__PURE__*/function (_Container) {
21 _inheritsLoose(Root, _Container);
22
23 function Root(opts) {
24 var _this;
25
26 _this = _Container.call(this, opts) || this;
27 _this.type = _types.ROOT;
28 return _this;
29 }
30
31 var _proto = Root.prototype;
32
33 _proto.toString = function toString() {
34 var str = this.reduce(function (memo, selector) {
35 memo.push(String(selector));
36 return memo;
37 }, []).join(',');
38 return this.trailingComma ? str + ',' : str;
39 };
40
41 _proto.error = function error(message, options) {
42 if (this._error) {
43 return this._error(message, options);
44 } else {
45 return new Error(message);
46 }
47 };
48
49 _createClass(Root, [{
50 key: "errorGenerator",
51 set: function set(handler) {
52 this._error = handler;
53 }
54 }]);
55
56 return Root;
57}(_container["default"]);
58
59exports["default"] = Root;
60module.exports = exports.default;
Note: See TracBrowser for help on using the repository browser.