/* * Copyright (C) Sapphirecode - All Rights Reserved * This file is part of graphviz-builder which is released under MIT. * See file 'LICENSE' for full license details. * Created by Timo Hocker , May 2020 */ /* eslint-disable line-comment-position */ /* eslint-disable no-inline-comments */ type GraphStreamCommand = 'at' | 'cdg' | 'ce' | 'cn' | 'csg' | 'cug' | 'eg' function translate_command (cmd: GraphStreamCommand|''): string { const translations = { cn: 'create node', cug: 'create unordered graph', cdg: 'create directional graph', csg: 'create subgraph', eg: 'end graph', at: 'attributes', ce: 'create edge', '': 'start' }; return `'${translations[cmd]}'`; } export { GraphStreamCommand, translate_command };