From da572ff7e5794fe020d9ed761a9240f1bee6b073 Mon Sep 17 00:00:00 2001 From: kzc Date: Fri, 26 May 2017 12:07:43 -0400 Subject: [PATCH] Update README.md --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index 777f189a..d147e619 100644 --- a/README.md +++ b/README.md @@ -258,6 +258,14 @@ $ uglifyjs example.js -c -m --mangle-props regex=/_$/ var x={o:0,_:1,calc:function(){return this._+this.o}};x.l=2,x.o=3,console.log(x.calc()); ``` +Combining mangle properties options: +```bash +$ uglifyjs example.js -c -m --mangle-props regex=/_$/,reserved=[bar_] +``` +```javascript +var x={o:0,_:1,calc:function(){return this._+this.o}};x.bar_=2,x.o=3,console.log(x.calc()); +``` + In order for this to be of any use, we avoid mangling standard JS names by default (`--mangle-props builtins` to override).