Extend Predicates

Potency Medium
Resilience Medium
Cost Medium
Tags: opaque predicates, predicates

Description

A predicate is an expression that evaluates to either true or false. This transformation extends the predicates in your code with opaque predicates making them harder to understand.

Code Annotation Example

// @jscrambler enable extendPredicates

Examples

The following example is a while statement with a simple predicate:

var i = 0;
while (i < 10) {
  i++;
}

After extending the predicate i < 10 the resulting predicate becomes harder to understand. The following example is a possible output:

var i = 0;
while (i < 10 && 5II.m()[8][1] == h5II.X()[7][2]) {
  i++;
}

Browser Compatibility

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+

API Parameters

Example:

{
  "keys": {
    "accessKey": "XXXXXX",
    "secretKey": "YYYYYY"
  },
  "applicationId": "ZZZZZZ",
  "params": [
    {
      "name": "extendPredicates"
    }
  ]
}