mirror of
https://github.com/javascript-obfuscator/javascript-obfuscator
synced 2026-08-09 12:42:29 +00:00
refactoring
This commit is contained in:
@@ -7,7 +7,7 @@ const Utils_1 = require('../Utils');
|
||||
class UnicodeArrayNodesGroup extends NodesGroup_1.NodesGroup {
|
||||
constructor() {
|
||||
super();
|
||||
this.unicodeArrayRotateFunctionIdentifier = Utils_1.Utils.getRandomVariableName();
|
||||
this.unicodeArrayRotateFunctionName = Utils_1.Utils.getRandomVariableName();
|
||||
let unicodeArrayName = Utils_1.Utils.getRandomVariableName(UnicodeArrayNode_1.UnicodeArrayNode.UNICODE_ARRAY_RANDOM_LENGTH), unicodeArrayRotateValue = Utils_1.Utils.getRandomInteger(100, 500);
|
||||
this.nodes = new Map([
|
||||
[
|
||||
@@ -16,11 +16,11 @@ class UnicodeArrayNodesGroup extends NodesGroup_1.NodesGroup {
|
||||
],
|
||||
[
|
||||
'unicodeArrayRotateFunctionNode',
|
||||
new UnicodeArrayRotateFunctionNode_1.UnicodeArrayRotateFunctionNode(this.unicodeArrayRotateFunctionIdentifier, unicodeArrayName)
|
||||
new UnicodeArrayRotateFunctionNode_1.UnicodeArrayRotateFunctionNode(this.unicodeArrayRotateFunctionName, unicodeArrayName)
|
||||
],
|
||||
[
|
||||
'unicodeArrayRotateFunctionCallNode',
|
||||
new UnicodeArrayRotateFunctionCallNode_1.UnicodeArrayRotateFunctionCallNode(this.unicodeArrayRotateFunctionIdentifier, unicodeArrayName, unicodeArrayRotateValue)
|
||||
new UnicodeArrayRotateFunctionCallNode_1.UnicodeArrayRotateFunctionCallNode(this.unicodeArrayRotateFunctionName, unicodeArrayName, unicodeArrayRotateValue)
|
||||
]
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
import { INode } from '../interfaces/nodes/INode';
|
||||
|
||||
import { ICustomNode } from '../interfaces/ICustomNode';
|
||||
|
||||
import { NodesGroup } from './NodesGroup';
|
||||
@@ -12,7 +10,7 @@ export class UnicodeArrayNodesGroup extends NodesGroup {
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
private unicodeArrayRotateFunctionIdentifier: string = Utils.getRandomVariableName();
|
||||
private unicodeArrayRotateFunctionName: string = Utils.getRandomVariableName();
|
||||
|
||||
constructor () {
|
||||
super();
|
||||
@@ -31,14 +29,14 @@ export class UnicodeArrayNodesGroup extends NodesGroup {
|
||||
[
|
||||
'unicodeArrayRotateFunctionNode',
|
||||
new UnicodeArrayRotateFunctionNode(
|
||||
this.unicodeArrayRotateFunctionIdentifier,
|
||||
this.unicodeArrayRotateFunctionName,
|
||||
unicodeArrayName
|
||||
)
|
||||
],
|
||||
[
|
||||
'unicodeArrayRotateFunctionCallNode',
|
||||
new UnicodeArrayRotateFunctionCallNode(
|
||||
this.unicodeArrayRotateFunctionIdentifier,
|
||||
this.unicodeArrayRotateFunctionName,
|
||||
unicodeArrayName,
|
||||
unicodeArrayRotateValue
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user