Skip to content

Instantly share code, notes, and snippets.

@yoppi
Created March 11, 2016 03:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yoppi/2567fb3c4ba0c3eb23c2 to your computer and use it in GitHub Desktop.
Save yoppi/2567fb3c4ba0c3eb23c2 to your computer and use it in GitHub Desktop.
custom mangle props
// ObjectKeyVal
// Dot
// Sub
var obj = {
'hoge': 'val'
};
var obj2 = {
foo: 'val'
};
if (obj.hasOwnProperty('hoge')) {
console.log(obj['hoge']);
}
console.log(obj2.foo);
var obj={hoge:"val"},obj2={a:"val"};obj.hasOwnProperty("hoge")&&console.log(obj.hoge),console.log(obj2.a);
@yoppi
Copy link
Author

yoppi commented Mar 11, 2016

bin/uglifyjs --compress --mangle --mangle-props --mangle-prop-types 1110 a.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment