Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
defNode = buildDefaultParamAssign({
VARIABLE_NAME: left,
DEFAULT_VALUE: right
});
}
defNode._blockHoist = node.params.length - i;
body.push(defNode);
}
// check if an index exceeds the functions arity
function exceedsLastNonDefault(i) {
return i + 1 > lastNonDefaultParam;
}
//
let lastNonDefaultParam = getFunctionArity(node);
//
let params = path.get("params");
for (let i = 0; i < params.length; i++) {
let param = params[i];
if (!param.isAssignmentPattern()) {
if (!param.isIdentifier()) {
param.traverse(iifeVisitor, state);
}
continue;
}
let left = param.get("left");
let right = param.get("right");