Code coverage report for src/node-obfuscators/AbstractNodeTransformer.ts

# All files / src/node-obfuscators AbstractNodeTransformer.ts

100% Statements 4/4
100% Branches 0/0
100% Functions 1/1
100% Lines 4/4

    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

    1x

    1x
    163730x
    163730x

     import * as ESTree from 'estree';

    import { ICustomNode } from '../interfaces/custom-nodes/ICustomNode';
    import { INodeObfuscator } from '../interfaces/INodeObfuscator';
    import { IOptions } from '../interfaces/IOptions';

    export abstract class AbstractNodeObfuscator implements INodeObfuscator {
        /**
         * @type Map <string, AbstractCustomNode>
         */
        protected nodes: Map <string, ICustomNode>;

        /**
         * @type {IOptions}
         */
        protected options: IOptions;

        /**
         * @param nodes
         * @param options
         */
        constructor(nodes: Map <string, ICustomNode>, options: IOptions) {
            this.nodes = nodes;
            this.options = options;
        }

        /**
         * @param node
         * @param parentNode
         */
        public abstract obfuscateNode (node: ESTree.Node, parentNode?: ESTree.Node): void;
    }