RGF (Runtime-Generated-Functions) creates executable code from strings.
Option name: "rgf"
Option values: true/false/0-1/Function
This example showcases how RGF transforms the code. Try it out by changing the input code and see changes apply in real-time.
Input.js
Output.js
RGF will only transform functions that are independent of their scope. A function referencing a variable outside of its scope disqualifies it from being transformed.
If you enable Flatten, you can isolate functions from their original scope so then RGF can then apply on them. This is the recommended way to use RGF.
Control which functions are changed. Returns a boolean.
Parameter | Type | Description |
---|---|---|
fnName | string | The function name proposed to be changed. |
The provided code example will obfuscate the file input.js and write the output to a file named output.js.
Usage Example
RGF only applies to: