tedious / JShrink

Javascript Minifier built in PHP
http://www.tedivm.com
BSD 3-Clause "New" or "Revised" License
749 stars 152 forks source link

Rewrite name of functions and variables #130

Closed stefanosilvestrinimia closed 1 year ago

stefanosilvestrinimia commented 1 year ago

Hi, is there a way to rewrite name of functions and variables automatically ?

for eg:

function setPriceCart() { ... }

could be renamed

function b() { ... }

thank you @tedivm

tedivm commented 1 year ago

This would require a lot more effort to do properly, as there would need to be proper tokenization/parsing to understand scope and deal with things properly. It would be a complete rearchitecture, and honestly if that's what you need there are already better tools out there for it (just not in php).