Refactoring

This commit is contained in:
sanex3339
2016-07-01 13:14:08 +03:00
parent 0d2c772a70
commit d8964da8d4
6 changed files with 96 additions and 86 deletions
@@ -0,0 +1,22 @@
import { IOptions } from "../interfaces/IOptions";
import { ConsoleOutputDisableExpressionNode } from "../custom-nodes/console-output-nodes/ConsoleOutputDisableExpressionNode";
import { NodesGroup } from './NodesGroup';
export class ConsoleOutputNodesGroup extends NodesGroup {
/**
* @param options
*/
constructor (options: IOptions) {
super(options);
if (!this.options.get('disableConsoleOutput')) {
return;
}
this.nodes.set(
'consoleOutputDisableExpressionNode',
new ConsoleOutputDisableExpressionNode(this.options)
);
}
}
@@ -19,6 +19,10 @@ export class DebugProtectionNodesGroup extends NodesGroup {
constructor (options: IOptions) {
super(options);
if (!this.options.get('debugProtection')) {
return;
}
this.nodes.set(
'debugProtectionFunctionNode',
new DebugProtectionFunctionNode(this.debugProtectionFunctionIdentifier, this.options)
@@ -10,6 +10,10 @@ export class SelfDefendingNodesGroup extends NodesGroup {
constructor (options: IOptions) {
super(options);
if (!this.options.get('selfDefending')) {
return;
}
this.nodes.set(
'selfDefendingUnicodeNode',
new SelfDefendingUnicodeNode(this.options)
@@ -29,6 +29,10 @@ export class UnicodeArrayNodesGroup extends NodesGroup {
constructor (options: IOptions) {
super(options);
if (!this.options.get('unicodeArray')) {
return;
}
if (this.options.get('rotateUnicodeArray')) {
this.unicodeArrayRotateValue = Utils.getRandomGenerator().integer({
min: 100,