davidbonnet / astring

🌳 Tiny and fast JavaScript code generator from an ESTree-compliant AST.

Home Page:https://david.bonnet.cc/astring/demo/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The "minify" mode

photopea opened this issue · comments

I would like to use your library in a code minifier. Could you add a new parameter "minify" : true / false ?

When true, it would omit spaces after commas, spaces around binary operators, and a semicolon after the last "item" in the code block.

Hi @photopea, this is considered in #203, yet had no time to actually work on it. Contributions welcome!