Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
renderer._renderStyleToClassNames = (
style: Object,
rule: Function
): string => {
if (Object.keys(style).length < 1) {
return ''
}
const localRulePrefix = renderer.prettySelectors && rule.name
? `${rule.name}_`
: ''
const className = generateMonolithicClassName(
style,
(renderer.selectorPrefix || '') + (rule.selectorPrefix || localRulePrefix)
)
if (!renderer.cache.hasOwnProperty(className)) {
renderer._renderStyleToCache(className, style)
renderer.cache[className] = true
}
return className
}