UNPKG

stylelint

Version:
25 lines (20 loc) 845 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = optionsHaveIgnoredAtRule; var _matchesStringOrRegExp = require("./matchesStringOrRegExp"); var _matchesStringOrRegExp2 = _interopRequireDefault(_matchesStringOrRegExp); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /** * Check if an options object contains a certain `ignoreAtRules` keyword. * It will look for an `ignoreAtRules` property whose value should * be an array of keywords. * * @param {object} options * @param {AtRule} atRule - postcss at-rule node * @return {boolean} */ function optionsHaveIgnoredAtRule(options, atRule) { return options && options.ignoreAtRules && atRule.type === "atrule" && (0, _matchesStringOrRegExp2.default)(atRule.name, options.ignoreAtRules); }