How this tool computes its result
Beautification: tracks quote state (single, double, template backtick) to avoid reformatting inside strings, then adds newlines after { ; and , characters, manages indentation with a counter that increments after { and decrements before }, collapses excess whitespace and blank lines at the end. Minification: first strips all // line comments and /* block comments */ (respecting quote states), then removes all whitespace and adds compact spacing around operators and punctuation via regex replacements, removing redundant ;} sequences.
