/* * 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 = 'cn'| 'en'| 'cug'| 'cdg'| 'csg'| 'eg'| 'at'| 'ce' function translate_command (cmd: GraphStreamCommand|''): string { const translations = { cn: 'create node', en: 'end 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 };