diff options
Diffstat (limited to 'node_modules/postcss-selector-parser/dist/processor.js')
| -rw-r--r-- | node_modules/postcss-selector-parser/dist/processor.js | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/node_modules/postcss-selector-parser/dist/processor.js b/node_modules/postcss-selector-parser/dist/processor.js new file mode 100644 index 00000000..087618ce --- /dev/null +++ b/node_modules/postcss-selector-parser/dist/processor.js @@ -0,0 +1,49 @@ +'use strict'; + +exports.__esModule = true; + +var _createClass = function () { function 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); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +var _parser = require('./parser'); + +var _parser2 = _interopRequireDefault(_parser); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +var Processor = function () { + function Processor(func) { + _classCallCheck(this, Processor); + + this.func = func || function noop() {}; + return this; + } + + Processor.prototype.process = function process(selectors) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + var input = new _parser2.default({ + css: selectors, + error: function error(e) { + throw new Error(e); + }, + options: options + }); + this.res = input; + this.func(input); + return this; + }; + + _createClass(Processor, [{ + key: 'result', + get: function get() { + return String(this.res); + } + }]); + + return Processor; +}(); + +exports.default = Processor; +module.exports = exports['default'];
\ No newline at end of file |
