Customize the lock algorithm to your own implementation.
Option name: "lock.customLocks"
Option values: true/false/0-1
This example showcases how Custom Locks transforms the code. Try it out by changing the input code and see changes apply in real-time.
Input.js
Output.js
Custom Locks allow you to define your own lock algorithm. These locks will be randomly sprinkled throughout the code.
The properties of the type Custom Lock are:
Property | Type | Description |
---|---|---|
code | string | Template lock code that must contain '{countermeasures}'. |
percentagePerBlock | number | The percentage of blocks that will contain the lock. |
maxCount | number | The maximum number of times the lock can be used. (Default = 25) |
minCount | number | The minimum number of times the lock can be used. (Default = 1) |
The provided code example will obfuscate the file input.js and write the output to a file named output.js.
Usage Example