Property Keys Reordering randomly reorders object literal's properties. The transformation doesn't reorder non-free side-effect expressions like IIFE, function calls, getter/setter, etc.
// @jscrambler enable propertyKeysReordering
The following example is an object literal with some properties:
var color = {
red: "FF0000",
blue: "0000FF",
green: hexCode("green"),
white: "FFFFFF"
}
red and blue properties are reordered but green, which value is a function call, is not:
var color = {
blue: "0000FF",
red: "FF0000",
green: hexCode("green"),
white: "FFFFFF"
}
Browser | Compatible Versions | Tested Versions | Notes |
---|---|---|---|
Chrome | 80+ | 80+ | |
Firefox | 90+ | 90+ | |
Internet Explorer | 8+ | 8+ | |
Microsoft Edge | 116+ | 116+ | |
Safari | 13.1+ | 13.1+ |
Example:
{
"keys": {
"accessKey": "XXXXXX",
"secretKey": "YYYYYY"
},
"applicationId": "ZZZZZZ",
"params": [
{
"name": "propertyKeysReordering"
}
]
}