@sequencemedia/css-purge
Version:
A CSS tool written in Node JS as a command line app or library for the purging, burning, reducing, shortening, compressing, cleaning, trimming and formatting of duplicate, extra, excess or bloated CSS.
15 lines (13 loc) • 340 B
JavaScript
export default function getSelectors ({ selectors = [] }, collector = [], ignorable = []) {
const hasSelectors = (
selectors.length
? !ignorable.some((selector) => selectors.includes(selector))
: false
)
if (hasSelectors) {
selectors
.forEach((selector) => {
collector.push(selector)
})
}
}