Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
var value = valueParser(decl.value).walk(function(node) {
var nodes = node.nodes
if (node.type === "function" && node.value === "rgba") {
try {
alpha = parseFloat(nodes[6].value)
RGB = calculateRGB(backgroundColor, [
parseInt(nodes[0].value, 10),
parseInt(nodes[2].value, 10),
parseInt(nodes[4].value, 10),
alpha,
])
hex = rgbToHex.apply(null, RGB)
node.type = "word"
node.value = "#" + hex
}
catch (e) {
return false
}
return false
}
}).toString()