All files / src/storages/control-flow ControlFlowStorage.ts

28.57% Statements 2/7
100% Branches 0/0
0% Functions 0/1
33.33% Lines 2/6
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20    1x   1x                              
import { ICustomNode } from '../../interfaces/custom-nodes/ICustomNode';
 
import { MapStorage } from '../MapStorage';
 
export class ControlFlowStorage extends MapStorage <ICustomNode> {
    /**
     * @returns {string}
     */
    public toString (): string {
        return Array
            .from(this.storage)
            .reduce((controlFlowStorageItems: string[], [key, value]: [string, ICustomNode]) => {
                controlFlowStorageItems.push(`${key}: ${value.getCode()}`);
 
                return controlFlowStorageItems;
            }, [])
            .join(',');
    }
}