All files / webpack:/src/node-groups DebugProtectionNodesGroup.ts

20% Statements 1/5
100% Branches 0/0
100% Functions 0/0
20% Lines 1/5
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43                                                  1x                                  
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.get('debugProtectionInterval')) {
            this.nodes.set(
                'debugProtectionFunctionIntervalNode',
                new DebugProtectionFunctionIntervalNode(this.debugProtectionFunctionIdentifier, this.options)
            );
        }
    }
}
 
 
 
// WEBPACK FOOTER //
// ./src/node-groups/DebugProtectionNodesGroup.ts