Object Properties Sparsing
Potency Low
Resilience Low
Cost Medium
Tags: object, literals, dot, notation
Description
Object Properties Sparsing transforms object literal's declarations into member expressions.
Code Annotation Example
// @jscrambler enable objectPropertiesSparsing
Example
Consider the following example:
var a = {
b: 1,
c: {
d: 2
}
};
Object Properties Sparsing will break down the object's properties and create the following expressions:
var e = {};
e.b = 1;
e.c = {};
e.c.d = 2;
var a = e;
Consider combining this transformation with obfuscation transformations to harden the resulting code, making it more resilient to automated de-obfuscator tools and troublesome to understand by a human. You may find useful to combine this transformation with Dot to Bracket Notation and string transformations to strengthen the result.
Browser Compatibility
Browser | Compatible Versions | Tested Versions | Notes |
Chrome | 80+ | 80+ | |
Firefox | 80+ | 80+ | |
Internet Explorer | 8+ | 8+ | |
Microsoft Edge | 111+ | 111+ | |
Safari | 12.1+ | 12.1+ | |
API Parameters
Example:
{
"keys": {
"accessKey": "XXXXXX",
"secretKey": "YYYYYY"
},
"applicationId": "ZZZZZZ",
"params": [
{
"name": "objectPropertiesSparsing"
}
]
}