Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
if (t.isObjectExpression(node)) {
node.replaceWith(simplifyObject(node.node, t))
}
})
if (label) {
appendStringToExpressions(path.node.arguments, `label:${label};`, t)
}
if (state.emotionSourceMap) {
if (!sourceMap && path.node.loc !== undefined) {
sourceMap = getSourceMap(path.node.loc.start, state)
}
appendStringToExpressions(path.node.arguments, sourceMap, t)
}
path.node.arguments = joinStringLiterals(path.node.arguments, t)
if (
path.node.arguments.length === 1 &&
t.isStringLiteral(path.node.arguments[0])
) {
let cssString = path.node.arguments[0].value
let res = css(cssString)
path.replaceWith(
t.objectExpression([
t.objectProperty(t.identifier('name'), t.stringLiteral(res.name)),
t.objectProperty(t.identifier('styles'), t.stringLiteral(res.styles))
])
)
}