Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
exports.ExpressionStatement = function (path, file) {
// hit the `AssignmentExpression` one below
if (path.isCompletionRecord()) return;
const expr = path.node.expression;
if (!opts.is(expr, file)) return;
const nodes = [];
const exploded = explode(expr.left, nodes, file, path.scope);
nodes.push(t.ifStatement(
opts.build(exploded.uid, file),
t.expressionStatement(buildAssignment(exploded.ref, expr.right))
));
return nodes;
};