Feeds your script through a real tokenizer — template literals with nested ${} interpolation, regex literals, strings and comments are all tracked, none of them can confuse the indenter — then reflows it with taste: one statement per line, blocks indented one level deep, } else { and }); kept tight, for(;;) headers left on a single line, and your own blank lines preserved between functions. The safety guarantee is structural: the beautifier never joins two lines, it only adds breaks after semicolons, after opening braces and before closing braces — so automatic semicolon insertion behaves exactly as you wrote it. Choose 2-space, 4-space or tab indentation from the deck, and hit ↯ Mangled sample to watch a one-line disaster become readable code.
const go=async()=>{let r=await fetch("/api");if(!r.ok){throw new Error("no")};return r.json()};
const go = async () => { let r = await fetch("/api"); if (!r.ok) { throw new Error("no"); } return r.json(); };
Use it for legacy bundlescode reviewde-obfuscationlearning