No — this performs safe, conservative minification (removing comments and unnecessary whitespace) rather than full optimization. For maximum compression, a dedicated tool like Terser is more appropriate.
Mostly, but avoid patterns like a bare return followed immediately by a newline and then a brace — whitespace collapsing could change behavior in that specific edge case.
Yes — it uses a preceding-token heuristic to distinguish regex literals (like /abc/g) from division operators.