-
-
Save yoppi/2567fb3c4ba0c3eb23c2 to your computer and use it in GitHub Desktop.
custom mangle props
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ObjectKeyVal | |
// Dot | |
// Sub | |
var obj = { | |
'hoge': 'val' | |
}; | |
var obj2 = { | |
foo: 'val' | |
}; | |
if (obj.hasOwnProperty('hoge')) { | |
console.log(obj['hoge']); | |
} | |
console.log(obj2.foo); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var obj={hoge:"val"},obj2={a:"val"};obj.hasOwnProperty("hoge")&&console.log(obj.hoge),console.log(obj2.a); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
bin/uglifyjs --compress --mangle --mangle-props --mangle-prop-types 1110 a.js