purgetss 5.3.21 → 5.3.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +3 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -765,13 +765,15 @@ function getRules(data) {
|
|
|
765
765
|
}
|
|
766
766
|
|
|
767
767
|
function getFontFamily(data) {
|
|
768
|
-
|
|
768
|
+
let allFontFamilies = _.map(data.stylesheet.rules, rule => {
|
|
769
769
|
if (rule.type === 'font-face') {
|
|
770
770
|
let something = rule.declarations.filter(declaration => declaration.property === 'font-family').map(declaration => declaration.value)[0];
|
|
771
771
|
something = something.replace(/'(.*?)'/g, (_match, p1) => p1);
|
|
772
772
|
return something;
|
|
773
773
|
}
|
|
774
774
|
}).filter(rule => rule);
|
|
775
|
+
|
|
776
|
+
return Array.from(new Set(allFontFamilies));
|
|
775
777
|
}
|
|
776
778
|
|
|
777
779
|
function findPrefix(rules) {
|
package/package.json
CHANGED