astring icon indicating copy to clipboard operation
astring copied to clipboard

Add `compact` option

Open sanex3339 opened this issue 5 years ago • 4 comments

Motivation

Hi. I have plans to migrate my project from escodegen to astring. Currently, my project heavily uses compact option from escodegen. It would be amazing to add this option to astring. When this option is enabled, all spaces (except spaces that cannot be removed without break the code) and line break characters will be removed

sanex3339 avatar Jan 04 '20 09:01 sanex3339

Agreed, this feature is the next milestone on the roadmap.

davidbonnet avatar Jan 12 '20 19:01 davidbonnet

Amazing

sanex3339 avatar Jan 12 '20 19:01 sanex3339

Hi, Any news about this? I still want to migrate from escodegen to something other and compact option is one of the features that I need. (also x-verbatim-property analog to keep hexadecimal numbers and unicode escape sequences)

sanex3339 avatar Apr 10 '21 18:04 sanex3339

Feel free to give it a go. It's basically a copy of the GENERATOR with all spaces removed and no indentation support.

davidbonnet avatar Jun 02 '21 12:06 davidbonnet