postcss-merge-rules
Advanced tools
Comparing version 5.0.2 to 5.0.3
@@ -6,3 +6,2 @@ "use strict"; | ||
}); | ||
exports.filterPrefixes = filterPrefixes; | ||
exports.sameVendor = sameVendor; | ||
@@ -17,4 +16,2 @@ exports.noVendor = noVendor; | ||
var _vendors = _interopRequireDefault(require("vendors")); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
@@ -30,5 +27,3 @@ | ||
const formValidation = 'form-validation'; | ||
/** @type {string[]} */ | ||
const prefixes = _vendors.default.map(v => `-${v}-`); | ||
const vendorPrefix = /-(ah|apple|atsc|epub|hp|khtml|moz|ms|o|rim|ro|tc|wap|webkit|xv)-/; | ||
/** | ||
@@ -39,5 +34,4 @@ * @param {string} selector | ||
function filterPrefixes(selector) { | ||
return prefixes.filter(prefix => selector.indexOf(prefix) !== -1); | ||
return selector.match(vendorPrefix); | ||
} // Internet Explorer use :-ms-input-placeholder. | ||
@@ -63,3 +57,3 @@ // Microsoft Edge use ::-ms-input-placeholder. | ||
function noVendor(selector) { | ||
return !filterPrefixes(selector).length; | ||
return !vendorPrefix.test(selector); | ||
} | ||
@@ -66,0 +60,0 @@ |
{ | ||
"name": "postcss-merge-rules", | ||
"version": "5.0.2", | ||
"version": "5.0.3", | ||
"description": "Merge CSS rules with PostCSS.", | ||
@@ -11,5 +11,5 @@ "main": "dist/index.js", | ||
"scripts": { | ||
"prebuild": "del-cli dist", | ||
"prebuild": "rimraf dist", | ||
"build": "cross-env BABEL_ENV=publish babel src --config-file ../../babel.config.json --out-dir dist --ignore \"**/__tests__/\"", | ||
"prepublish": "yarn build" | ||
"prepare": "yarn build" | ||
}, | ||
@@ -34,4 +34,3 @@ "keywords": [ | ||
"cssnano-utils": "^2.0.1", | ||
"postcss-selector-parser": "^6.0.5", | ||
"vendors": "^1.0.3" | ||
"postcss-selector-parser": "^6.0.5" | ||
}, | ||
@@ -49,4 +48,3 @@ "bugs": { | ||
"postcss": "^8.2.15" | ||
}, | ||
"gitHead": "9b3c54fd94f3e2bdb503d1e21f171d7fe02f33ca" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5
19552
502
- Removedvendors@^1.0.3
- Removedvendors@1.0.4(transitive)