Blame view

node_modules/postcss-merge-longhand/dist/lib/canMerge.js 780 Bytes
ce4c83ff   wxy   初始提交
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
  'use strict';
  
  Object.defineProperty(exports, '__esModule', {
      value: true
  });
  var important = function important(node) {
      return node.important;
  };
  var unimportant = function unimportant(node) {
      return !node.important;
  };
  var hasInherit = function hasInherit(node) {
      return ~node.value.indexOf('inherit');
  };
  var hasInitial = function hasInitial(node) {
      return ~node.value.indexOf('initial');
  };
  
  exports['default'] = function () {
      for (var _len = arguments.length, props = Array(_len), _key = 0; _key < _len; _key++) {
          props[_key] = arguments[_key];
      }
  
      if (props.some(hasInherit) || props.some(hasInitial)) {
          return false;
      }
      return props.every(important) || props.every(unimportant);
  };
  
  module.exports = exports['default'];