canExplode.js 768 B

12345678910111213141516171819202122232425
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. var _isCustomProp = require("./isCustomProp");
  6. var _isCustomProp2 = _interopRequireDefault(_isCustomProp);
  7. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  8. const hasInherit = node => node.value.toLowerCase().includes("inherit");
  9. const hasInitial = node => node.value.toLowerCase().includes("initial");
  10. const hasUnset = node => node.value.toLowerCase().includes("unset");
  11. exports.default = (prop, includeCustomProps = true) => {
  12. if (includeCustomProps && (0, _isCustomProp2.default)(prop)) {
  13. return false;
  14. }
  15. return !hasInherit(prop) && !hasInitial(prop) && !hasUnset(prop);
  16. };
  17. module.exports = exports["default"];