Age | Commit message (Collapse) | Author | |
---|---|---|---|
2015-08-05 | Fix mangling of property names which overwrite unmangleable properties | Richard van Velzen | |
Fixes #747. | |||
2015-06-09 | Add --mangle-regex option | Joao Carlos | |
2015-05-13 | fix again reserved props | Mihai Bazon | |
2015-05-07 | Make reserved names take priority over the name cache | Mihai Bazon | |
2015-04-22 | If name_cache is specified, do rename cached properties | Mihai Bazon | |
(even if --mangle-props is not there) | |||
2015-04-10 | Use the `before` visitor in mangle props | Mihai Bazon | |
(works around a bug in our tree walker which, while cloning nodes, breaks references between labeled statements and break/continue labels) | |||
2015-03-16 | Fix prop mangling | Mihai Bazon | |
Even if not “defined”, do mangle if name exists in the cache. | |||
2015-03-14 | Add property name mangler | Mihai Bazon | |
We only touch properties that are present in an object literal, or which are assigned to. Example: x = { foo: 1 }; x.bar = 2; x["baz"] = 3; x[cond ? "qwe" : "asd"] = 4; console.log(x.stuff); The names "foo", "bar", "baz", "qwe" and "asd" will be mangled, and the resulting mangled names will be used for the same properties throughout the code. The "stuff" will not be, since it's just referenced but never assigned to. This *will* break most of the code out there, but could work on carefully written code: do not use eval, do not define methods or properties by walking an array of names, etc. Also, a comprehensive list of exclusions needs to be passed, to avoid mangling properties that are standard in JavaScript, DOM, used in external libraries etc. |