esmangle icon indicating copy to clipboard operation
esmangle copied to clipboard

esmangle is mangler / minifier for Mozilla Parser API AST

Results 32 esmangle issues
Sort by recently updated
recently updated
newest added

The option could be something like: ``` js format: { es6: true } ``` …or `es2015` or a more generic `esnext`. --- A simple example of what it would do:...

I'm not able to find any documentation. What functions are available on `esmangle`, and what's their purpose? What's the difference between `optimize` and `mangle` functions? What are the options that...

``` js var a = 0; ``` can become ``` js a=0 ``` at program level. Any assignment to a non-computed member access on `this` at program level can be...

1. ``` js function t() { if (a) { ... } return; } ``` should be transformed to ``` js function t() { if (a) { ... } } ```...

The source-map names array of the [Source Map Revision 3 Proposal](https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=6&cad=rja&ved=0CFcQFjAF&url=https%3A%2F%2Fdocs.google.com%2Fdocument%2Fd%2F1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k%2F&ei=lB_gUYvQJtGChQfF-4D4Aw&usg=AFQjCNFDPj0BWvXzCjzdzDrY8EWI8qarmw&bvm=bv.48705608,d.ZG4), allows you to find the original name of a mangled identifier. Introduced in escodegen: Constellation/escodegen#113, the resulting names array...

We already do something similar with strings, reducing `'\x20'` to `' '` (escodegen handles this for us automatically). It gets trickier with regular expressions, though, because we will need to...

``` js if(condition){ a(); b(); } else { c(); b(); } ``` `b` will be called unconditionally, so it can be taken out. ``` js if(condition) a(); else c(); b();...

Hi there, Thanks for your AMAZING work ;) In future, do you plan to mangle object properties ? I use the application from the git repository. With the following code:...

It would be cool if there was an boolean option that we could pass to `esmangle` for each of these optimizations: https://github.com/Constellation/esmangle/blob/c9393254197119a73f92055ee6d1887535cbf47d/lib/esmangle.js#L254-L288 All the options would be `true` by default,...

``` js function t() { var i = 20, i2 = 30; test(); var i3 = 40; } ``` to ``` js function t() { var i = 20, i2...

enhancement