appearance.js 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. "use strict";
  2. function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
  3. function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); }
  4. function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
  5. var Declaration = require('../declaration');
  6. var utils = require('../utils');
  7. var Appearance = /*#__PURE__*/function (_Declaration) {
  8. _inheritsLoose(Appearance, _Declaration);
  9. function Appearance(name, prefixes, all) {
  10. var _this;
  11. _this = _Declaration.call(this, name, prefixes, all) || this;
  12. if (_this.prefixes) {
  13. _this.prefixes = utils.uniq(_this.prefixes.map(function (i) {
  14. if (i === '-ms-') {
  15. return '-webkit-';
  16. }
  17. return i;
  18. }));
  19. }
  20. return _this;
  21. }
  22. return Appearance;
  23. }(Declaration);
  24. _defineProperty(Appearance, "names", ['appearance']);
  25. module.exports = Appearance;