You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
768 B

4 years ago
  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"];