Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
let match
let ids = {}
while ((match = RGX.exec(html)) !== null) {
if (!ids[match[1]]) {
ids[match[1]] = true
}
}
o.rules = sheet.sheet.cssRules.slice().filter(x => {
RGX.lastIndex = 0
let match = RGX.exec(x.cssText)
const ret = match == null || ids[match[1]] || false
return ret
})
o.ids = keys(inserted).filter(id => {
return !!ids[id] || !registered[`css-${id}`]
})
let css = ''
forEach(o.rules, x => (css += x.cssText))
o.css = css
return o
}