add clean_getters compressor option (default false)

allows one to specify if `foo.bar` is considered to have side effects.
This commit is contained in:
Mihai Bazon
2013-10-02 19:33:45 +03:00
parent 88fb83aa81
commit 8cc86fee60
2 changed files with 55 additions and 49 deletions

View File

@@ -212,6 +212,9 @@ to set `true`; it's effectively a shortcut for `foo=true`).
- `negate_iife` -- negate "Immediately-Called Function Expressions"
where the return value is discarded, to avoid the parens that the
code generator would insert.
- `clean_getters` -- the default is `false`. If you pass `true` for
this, UglifyJS will assume that object property access
(e.g. `foo.bar` or `foo["bar"]`) doesn't have any side effects.
### The `unsafe` option