Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function isSimpleMemberExpression(expression) {
expression = (0, _helperSkipTransparentExpressionWrappers.skipTransparentExprWrappers)(expression);
return _core.types.isIdentifier(expression) || _core.types.isSuper(expression) || _core.types.isMemberExpression(expression) && !expression.computed && isSimpleMemberExpression(expression.object);
}
CallExpression(path) {
const {
node,
scope
} = path;
const args = node.arguments;
if (!hasSpread(args)) return;
const calleePath = (0, _helperSkipTransparentExpressionWrappers.skipTransparentExprWrappers)(path.get("callee"));
if (calleePath.isSuper()) return;
let contextLiteral = scope.buildUndefinedNode();
node.arguments = [];
let nodes;
if (args.length === 1 && args[0].argument.name === "arguments") {
nodes = [args[0].argument];
} else {
nodes = build(args, scope);
}
const first = nodes.shift();
if (nodes.length) {
node.arguments.push(_core.types.callExpression(_core.types.memberExpression(first, _core.types.identifier("concat")), nodes));
} else {
const parentPath = path.findParent(p => {
if (!(0, _helperSkipTransparentExpressionWrappers.isTransparentExprWrapper)(p)) return true;
maybeWrapped = p;
});
let isDeleteOperation = false;