Boolean To Anything

Potency Low
Resilience Low
Cost Low
Tags: boolean, anything, strings, arrays, booleans, numbers


A boolean is a data type that can have one of two values: true or false. The goal of this transformation is to transform boolean literals into expressions that return the same boolean value but are harder to understand. This will reduce code readability.

Code Annotation Example

// @jscrambler enable booleanToAnything


The following example is an expression with two boolean literals:

true || false;

The transformation produces random results so the following example is a possible output:

!!1 || !{}

Consider combining this transformation with Duplicate Literals Removal to replace literals like 1 and {} with variables (aliases) that will make the resulting code more resilient to automated de-obfuscator tools.

Browser Compatibility

Browser Compatible Versions Tested Versions Notes
Chrome 50+ 50+
Firefox 40+ 40+
Internet Explorer 8+ 8+
Microsoft Edge 18+ 18+
Safari 9.1+ 9.1+

API Parameters


  "keys": {
    "accessKey": "XXXXXX",
    "secretKey": "YYYYYY"
  "applicationId": "ZZZZZZ",
  "params": [
      "name": "booleanToAnything"