terser5.51.41.1 MB
Shown as plain text from the published tarball, after apm checked it against the version's checksum. Nothing in it runs on this page.
}
});
if (parent instanceof AST_LabeledStatement) tw.push(parent);
tw.push(loop);
loop.body.walk(tw);
return found;
}
// we shouldn't compress (1,func)(something) to
// func(something) because that changes the meaning of
// the func (becomes lexical instead of global).
function maintain_this_binding(parent, orig, val) {
if (requires_sequence_to_maintain_binding(parent, orig, val)) {
const zero = make_node(AST_Number, orig, { value: 0 });
return make_sequence(orig, [ zero, val ]);
} else {
return val;
}
}
/** Detect (1, x.noThis)(), (0, eval)(), which need sequences */
function requires_sequence_to_maintain_binding(parent, orig, val) {
return (
parent instanceof AST_UnaryPrefix && parent.operator == "delete"
|| parent instanceof AST_Call && parent.expression === orig
&& (
val instanceof AST_Chain
|| val instanceof AST_PropAccess
|| val instanceof AST_SymbolRef && val.name == "eval"
)
);
}
function is_func_expr(node) {
return node instanceof AST_Arrow || node instanceof AST_Function;
}
/**
* Used to determine whether the node can benefit from negation.
* Not the case with arrow functions (you need an extra set of parens). */
function is_iife_call(node) {
This file is 1.1 MB, over the 1.0 MB the full view shows, so apm shows the lines around the cited one. Lines longer than 4 kB are cut.