mirror of
https://github.com/javascript-obfuscator/javascript-obfuscator
synced 2026-08-09 12:42:29 +00:00
WIP: trying to remove some logic from node groups classes
This commit is contained in:
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
@@ -22,7 +22,6 @@ import { CallsControllerFunctionCodeHelper } from '../../calls-controller/CallsC
|
||||
import { ConsoleOutputDisableCodeHelper } from '../ConsoleOutputDisableCodeHelper';
|
||||
import { NodeAppender } from '../../../node/NodeAppender';
|
||||
import { NodeLexicalScopeUtils } from '../../../node/NodeLexicalScopeUtils';
|
||||
import { NodeGuards } from '../../../node/NodeGuards';
|
||||
|
||||
@injectable()
|
||||
export class ConsoleOutputCodeHelperGroup extends AbstractCustomCodeHelperGroup {
|
||||
@@ -82,13 +81,11 @@ export class ConsoleOutputCodeHelperGroup extends AbstractCustomCodeHelperGroup
|
||||
.getLexicalScope(consoleOutputDisableHostNode) ?? null;
|
||||
|
||||
const consoleOutputDisableFunctionName: string = consoleOutputDisableLexicalScopeNode
|
||||
&& NodeGuards.isProgramNode(consoleOutputDisableLexicalScopeNode)
|
||||
? this.identifierNamesGenerator.generate(consoleOutputDisableLexicalScopeNode)
|
||||
: this.randomGenerator.getRandomString(5);
|
||||
: this.identifierNamesGenerator.generateNext();
|
||||
const callsControllerFunctionName: string = consoleOutputDisableLexicalScopeNode
|
||||
&& NodeGuards.isProgramNode(consoleOutputDisableLexicalScopeNode)
|
||||
? this.identifierNamesGenerator.generate(consoleOutputDisableLexicalScopeNode)
|
||||
: this.randomGenerator.getRandomString(5);
|
||||
: this.identifierNamesGenerator.generateNext();
|
||||
|
||||
// consoleOutputDisableExpression helper nodes append
|
||||
this.appendCustomNodeIfExist(
|
||||
|
||||
@@ -84,13 +84,11 @@ export class DebugProtectionCodeHelperGroup extends AbstractCustomCodeHelperGrou
|
||||
.getLexicalScope(debugProtectionFunctionCallHostNode) ?? null;
|
||||
|
||||
const debugProtectionFunctionName: string = debugProtectionFunctionCallScopeNode
|
||||
&& NodeGuards.isProgramNode(debugProtectionFunctionCallScopeNode)
|
||||
? this.identifierNamesGenerator.generate(debugProtectionFunctionCallScopeNode)
|
||||
: this.randomGenerator.getRandomString(5);
|
||||
: this.identifierNamesGenerator.generateNext();
|
||||
const callsControllerFunctionName: string = debugProtectionFunctionCallScopeNode
|
||||
&& NodeGuards.isProgramNode(debugProtectionFunctionCallScopeNode)
|
||||
? this.identifierNamesGenerator.generate(debugProtectionFunctionCallScopeNode)
|
||||
: this.randomGenerator.getRandomString(5);
|
||||
: this.identifierNamesGenerator.generateNext();
|
||||
|
||||
// debugProtectionFunctionCall helper nodes append
|
||||
this.appendCustomNodeIfExist(
|
||||
|
||||
Reference in New Issue
Block a user