mirror of
https://github.com/javascript-obfuscator/javascript-obfuscator
synced 2026-08-09 12:42:29 +00:00
39 lines
1.4 KiB
TypeScript
39 lines
1.4 KiB
TypeScript
import { IOptions } from "../interfaces/IOptions";
|
|
|
|
import { DebugProtectionFunctionCallNode } from "../custom-nodes/debug-protection-nodes/DebugProtectionFunctionCallNode";
|
|
import { DebugProtectionFunctionIntervalNode } from "../custom-nodes/debug-protection-nodes/DebugProtectionFunctionIntervalNode";
|
|
import { DebugProtectionFunctionNode } from "../custom-nodes/debug-protection-nodes/DebugProtectionFunctionNode";
|
|
|
|
import { NodesGroup } from './NodesGroup';
|
|
import { Utils } from '../Utils';
|
|
|
|
export class DebugProtectionNodesGroup extends NodesGroup {
|
|
/**
|
|
* @type {string}
|
|
*/
|
|
private debugProtectionFunctionIdentifier: string = Utils.getRandomVariableName();
|
|
|
|
/**
|
|
* @param options
|
|
*/
|
|
constructor (options: IOptions) {
|
|
super(options);
|
|
|
|
this.nodes.set(
|
|
'debugProtectionFunctionNode',
|
|
new DebugProtectionFunctionNode(this.debugProtectionFunctionIdentifier, this.options)
|
|
);
|
|
this.nodes.set(
|
|
'debugProtectionFunctionCallNode',
|
|
new DebugProtectionFunctionCallNode(this.debugProtectionFunctionIdentifier, this.options)
|
|
);
|
|
|
|
if (this.options.getOption('debugProtectionInterval')) {
|
|
this.nodes.set(
|
|
'debugProtectionFunctionIntervalNode',
|
|
new DebugProtectionFunctionIntervalNode(this.debugProtectionFunctionIdentifier, this.options)
|
|
);
|
|
}
|
|
}
|
|
}
|