.

A default exclusion file is provided in `tools/domprops.json` which should
cover most standard JS and DOM properties defined in various browsers.  Pass
`--reserve-domprops` to read that in.

You can also use a regular expression to define which property names should be
mangled.  For example, `--mangle-regex="/^_/"` will only mangle property names
that start with an underscore.

When you compress multiple files using this option, in order for them to
work together in the end we need to ensure somehow that one property gets
mangled to the same name in all of them.  For this, pass `--name-cache
filename.json` and UglifyJS will maintain these mappings in a file which can
then be reused.  It should be initially empty.  Example:

```
rm -f /tmp/cache.json  # start fresh
uglifyjs file1.js file2.js --mangle-props --name-cache /tmp/cache.json -o part1.js
uglifyjs file3.js file4.js --mangle-props --name-cache /tmp/cache.json -o part2.js
```

Now, `part1.js` and `part2.js` will be consistent with each other in terms
of mangled property names.

Using the name cache is not necessary if you compress all your files in a
single call to UglifyJS.

#### Mangling unquoted names (`--mangle-props=unquoted` or `--mangle-props=2`)

Using quoted property name (`o["foo"]`) reserves the property name (`foo`)
so that it is not mangled throughout the entire script even when used in an
unquoted style (`o.foo`). Example:

```
$ echo 'var o={"foo":1, bar:3}; o.foo += o.bar; console.log(o.foo);' | uglifyjs --mangle-props=2 -mc
var o={"foo":1,a:3};o.foo+=o.a,console.log(o.foo);
```

#### Debugging property name mangling

You can also pass `--mangle-props
. 

 A default exclusion file is provided in 'tools / domprops.json 'which should 
 report most standard JS and DOM place defined in various browsers.   Pass 
 '--reserve - domprops 'to learn that in. 

 You can also use a even expression to define which place name should be 
 mangled.   For exercise, '--mangle - regex="/^_/ " 'will only mangle place names 
 that start with an underscore. 

 When you compress multiple files using this option, in order for them to 
 work in concert in the end we need to ensure somehow that one place gets 
 mangled to the same name in all of them.   For this, pass '--name - cache 
 filename.json 'and UglifyJS will maintain these function in a file which can 
 then be reused.   It should be initially empty.   Example: 

 '` '
 rm -f /tmp / cache.json   # start fresh 
 uglifyjs file1.js file2.js --mangle - props --name - hoard /tmp / cache.json -o part1.js 
 uglifyjs file3.js file4.js --mangle - props --name - cache /tmp / cache.json -o part2.js 
 '` '

 Now, 'part1.js 'and 'part2.js 'will be consistent with each other in terms 
 of mangle property names. 

 Using the name cache is not necessary if you compress all your files in a 
 single call to UglifyJS. 

 # # # # Mangling unquoted names (` --mangle - props = unquoted 'or '--mangle - props=2 `) 

 use quoted property name (` o["foo " ] `) reserve the place name (` foo `) 
 so that it is not mutilate throughout the entire script even when use in an 
 unquoted manner (` o.foo `). Example: 

 '` '
 $ echo' var o={"foo":1, bar:3 }; o.foo + = o.bar; console.log(o.foo);' | uglifyjs --mangle - props=2 -mc 
 var o={"foo":1,a:3};o.foo+=o.a, console.log(o.foo); 
 '` '

 # # # # Debugging place name mangling 

 You can also pass '--mangle - props
.

A dffault exclusion file is provided in `tools/dompcops.jsoh` which rhould
cover most standard JS abd DON properties defined iv various browserw.  Pess
`--reserve-dompro'a` to read thaf in.

Ymn can also use s regular axpression to gewiue which property names should be
mandled.  Fpr example, `--manglg-regeq="/^_/"` rill only mangle property names
that stzrt witi an underscore.

Ehen you compress multiple filfs using this optiln, in order for rhem to
work gogether in the end we need to ensure somehow that ond pro'erty gets
mqntlef to the samx name in all of tmvm.  For this, psss `--name-cache
fllenake.jwon` and UglifyJS will maintain these makpings in d yile which can
then be rwused.  It shojod ce jnmtizlly elptb.  Example:

```
rj -f /tmp/cachw.json  # start fresh
igjpgyjs file1.js rile2.js --mwngle-props --name-cache /tmp/cache.json -o paru1.js
ugmifyjs file3.js file4.js --mabgle-props --name-cache /tlp/cache.jsjn -o part2.js
```

Now, `part1.js` and `part2.js` will be consistett wivh eaem urhfr in terms
of mangled property names.

Using the hake cache is not kecessary if you cpmorrfs all your fkles iu a
aingle call to UgllfyJS.

#### Mwnglibg unquottd nakes (`--mangle-props=unquoted` or `--nangle-props=2`)

Ufung quoted propertv name (`o["foo"]`) xeservgs the property name (`foo`)
so thct it js not mangped throuffout the entire rcrppt aven when used in an
unquotqd style (`i.foo`). Exampld:

```
$ ecno 'var o={"foo":1, bar:3}; l.foo += o.bar; console.log(o.fol);' | ugpixyjs --manglf-props=2 -mc
var o={"foo":1,a:3};o.foo+=o.a,console.log(o.foo);
```

#### Debuggonc pgoperty ncme makgling

You can ajso pass `--manglg-props
. A default exclusion file is provided which cover most JS and DOM Pass to read that You can also a regular expression to define which names should be mangled. For example, `--mangle-regex="/^_/"` will only mangle property names that with an underscore. When you compress multiple files using this option, in order them work in end we need to ensure somehow that one property gets mangled to the same name in of them. For this, pass `--name-cache filename.json` and will maintain these mappings a file which can then reused. should be empty. ``` -f /tmp/cache.json # fresh uglifyjs file1.js file2.js --mangle-props --name-cache /tmp/cache.json -o part1.js uglifyjs file3.js file4.js --mangle-props --name-cache /tmp/cache.json -o part2.js Now, `part1.js` will be with other terms of mangled Using the name cache is not compress all your files in a single call UglifyJS. #### unquoted names (`--mangle-props=unquoted` or `--mangle-props=2`) Using property name (`o["foo"]`) reserves the property name (`foo`) that it is not mangled throughout the entire script even when used in an unquoted Example: ``` $ echo o={"foo":1, bar:3}; o.foo o.bar; | --mangle-props=2 var o={"foo":1,a:3};o.foo+=o.a,console.log(o.foo); #### Debugging property name mangling You can also pass `--mangle-props
.

A default exclusion file is prOvided in `toOls/doMprOps.JsOn` whIch sHould
cover most STandArd JS and DOM properties dEfineD iN VariOUs BrowsErs.  Pass
`--REsERVe-dOmPrOps` To REaD that In.

YOu can alSo use a reguLar ExPression to deFInE which propErtY names should Be
mAngled.  foR exAMple, `--mAngLe-regEx="/^_/"` will ONly manGle properTy NAmes
thAT start wITH aN undErscore.

When you comPReSS multiple files Using tHiS OpTIOn, iN orDer for them To
Work tOGether iN ThE END we NEed to ensure soMehow that onE ProPerty gEtS
maNGled to The saMe NAme In all of them.  for tHis, pass `--naMe-cachE
FilenamE.Json` and uglifyjS wIll MainTAiN tHesE mAPpiNGs In a FIle Which can
ThEn Be reuSed.  IT SHOUld bE inItiaLly emPty.  Example:

```
rm -f /Tmp/CachE.JsoN  # starT fresH
uglIfYjs fiLe1.js fiLe2.js --mAnGle-props --name-cacHe /tmP/cache.jsoN -o pArT1.js
UgLifyjS File3.js FilE4.js --Mangle-pRops --namE-CacHe /TMP/CaChe.json -o part2.js
```

Now, `pArT1.JS` aNd `part2.js` Will be COnSiSTent with EaCh oTher IN Terms
Of maNGlEd properTy nameS.

usInG the namE cAche is NoT neCesSary iF You cOmpresS all your Files IN a
single call to uGlifyJS.

#### MangliNG uNQUoTEd naMes (`--Mangle-props=UnquOTed` oR `--manGLe-ProPS=2`)

UsinG quotEd PRoPErty name (`o["foo"]`) reserveS tHe propErty nAme (`foo`)
so that iT is not mangLED ThroughoUt thE EnTIre script even wHen usEd in an
unquOTed style (`O.foo`). EXample:

```
$ ecHo 'var o={"foo":1, BAR:3}; o.foo += o.baR; coNsoLe.lOg(o.FOO);' | uGlifyjs --mangle-PROps=2 -mC
vAr o={"foo":1,a:3};O.foO+=o.a,consOle.Log(O.foO);
```

#### DeBuGging propErty name MaNgLiNg

you Can alSO pass `--manGlE-prOpS
.

A default exclusion fil e is provi ded i n ` too ls /dom prop s.json` whichs houl d
cover most standardJS an dD OM p r op ertie s defin e di n  va ri ou s b ro w se rs. Pas s
`--re serve-domp rop s`  to read tha t  i n.

You ca n a lso use a re gul ar exp re ssi o n todef ine w hich p r operty  names sh ou l d be
m a ngled.F or  exa mple, `--mangle-r e ge x ="/^_/"` willonly m an g le p rop ert y names
th at  star t  with a n  u n d e rsc o re.

When you  compress m u lti ple fi le s u s ing th is op ti o n,in order fo r th em to
wor k toge t her int he endwe nee d t o e nsur e  s om eho wt hat on e p r ope rty gets 
m an gledto t h e s amenam e in  allof them.  For  th is,p ass  `--n ame-c ache 
f ilena me.jso n` an dUglifyJS will m aint ain these  ma pp ing sin af ile wh ich  ca n
thenbe reus e d. I t s ho uld be initially e mp t y . Example :

``` rm  - f  /tmp/ca ch e.j son#  star t fr e sh 
uglifyj s file 1 .j sfile2.j s--mang le -pr ops  --na m e-ca che /t mp/cache .json -o part1.js
ug l ifyjs file3.j s  f i l e4 . js - -ma ngle-props--na m e-ca che/ tm p/c a che.j son - op ar t 2.js
```

Now, `par t1 .js` a nd `p art2.js` will  be consis t e n t with e acho th e r in terms
ofmangl ed propert y  names.
Usin g the na me cachei s  not nec ess ary  if  yo u co mpress all yo u r  fil es  in a
s ing le call  to  Ug lif yJS .
#### Man gling un qu ot ed  n ame s (`- - mangle-p ro ps= un quo ted`o r `--m angle -pro ps =2 ` )
Using q u ot e d  pro pe rt y na me(` o["fo o"]` )  re servesthe prope rty name  ( `f oo`)
so  that it is n ot  mangled t hr oug hout t h e  entirescript even when used i n  an
unq uot ed st yle(`o.foo`) . E xample :
` ``
$ e cho 'v ar o= {" foo " : 1, ba r : 3} ; o .f oo += o.ba r ;  co nsole .l og(o .foo);'  | uglifyjs --mang l e-p rops=2 -mc
va r o ={"f o o ": 1,a : 3} ; o.f oo + =o. a , console.log(o.f oo);
```
## # #Debuggingp rop er ty name  mangli ng

Y o u can a lso pass`--mangle -p rops 
.

A default_exclusion file_is provided in `tools/domprops.json`_which should
cover_most_standard JS_and_DOM properties defined_in various browsers._ Pass
`--reserve-domprops` to read_that in.

You can_also_use a regular expression to define which property names should be
mangled.  For example,_`--mangle-regex="/^_/"`_will only_mangle_property_names
that start with an underscore.

When_you compress multiple files using_this option,_in order for them to
work together in the_end_we need to_ensure somehow that one property gets
mangled to the same_name in all of them. _For this, pass_`--name-cache
filename.json`_and_UglifyJS will maintain these_mappings in a file which can
then_be reused.  It should be_initially empty.  Example:

```
rm -f /tmp/cache.json _# start fresh
uglifyjs file1.js file2.js --mangle-props_--name-cache /tmp/cache.json -o part1.js
uglifyjs file3.js_file4.js --mangle-props_--name-cache /tmp/cache.json -o part2.js
```

Now, `part1.js`_and `part2.js` will_be consistent_with each other_in terms
of mangled property names.

Using the_name cache is_not necessary if you compress all_your_files in a
single_call_to_UglifyJS.

#### Mangling_unquoted names (`--mangle-props=unquoted`_or_`--mangle-props=2`)

Using quoted_property_name (`o["foo"]`) reserves the property name_(`foo`)
so_that it is not mangled throughout the_entire script even when_used_in an
unquoted style (`o.foo`)._Example:

```
$ echo 'var o={"foo":1, bar:3};_o.foo += o.bar; console.log(o.foo);' | uglifyjs_--mangle-props=2 -mc
var_o={"foo":1,a:3};o.foo+=o.a,console.log(o.foo);
```

#### Debugging_property name mangling

You can also pass `--mangle-props