Ohm-Management - Projektarbeit B-ME
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

getBorderCharacters.js 2.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.default = void 0;
  6. /* eslint-disable sort-keys */
  7. /**
  8. * @typedef border
  9. * @property {string} topBody
  10. * @property {string} topJoin
  11. * @property {string} topLeft
  12. * @property {string} topRight
  13. * @property {string} bottomBody
  14. * @property {string} bottomJoin
  15. * @property {string} bottomLeft
  16. * @property {string} bottomRight
  17. * @property {string} bodyLeft
  18. * @property {string} bodyRight
  19. * @property {string} bodyJoin
  20. * @property {string} joinBody
  21. * @property {string} joinLeft
  22. * @property {string} joinRight
  23. * @property {string} joinJoin
  24. */
  25. /**
  26. * @param {string} name
  27. * @returns {border}
  28. */
  29. const getBorderCharacters = name => {
  30. if (name === 'honeywell') {
  31. return {
  32. topBody: '═',
  33. topJoin: '╤',
  34. topLeft: '╔',
  35. topRight: '╗',
  36. bottomBody: '═',
  37. bottomJoin: '╧',
  38. bottomLeft: '╚',
  39. bottomRight: '╝',
  40. bodyLeft: '║',
  41. bodyRight: '║',
  42. bodyJoin: '│',
  43. joinBody: '─',
  44. joinLeft: '╟',
  45. joinRight: '╢',
  46. joinJoin: '┼'
  47. };
  48. }
  49. if (name === 'norc') {
  50. return {
  51. topBody: '─',
  52. topJoin: '┬',
  53. topLeft: '┌',
  54. topRight: '┐',
  55. bottomBody: '─',
  56. bottomJoin: '┴',
  57. bottomLeft: '└',
  58. bottomRight: '┘',
  59. bodyLeft: '│',
  60. bodyRight: '│',
  61. bodyJoin: '│',
  62. joinBody: '─',
  63. joinLeft: '├',
  64. joinRight: '┤',
  65. joinJoin: '┼'
  66. };
  67. }
  68. if (name === 'ramac') {
  69. return {
  70. topBody: '-',
  71. topJoin: '+',
  72. topLeft: '+',
  73. topRight: '+',
  74. bottomBody: '-',
  75. bottomJoin: '+',
  76. bottomLeft: '+',
  77. bottomRight: '+',
  78. bodyLeft: '|',
  79. bodyRight: '|',
  80. bodyJoin: '|',
  81. joinBody: '-',
  82. joinLeft: '|',
  83. joinRight: '|',
  84. joinJoin: '|'
  85. };
  86. }
  87. if (name === 'void') {
  88. return {
  89. topBody: '',
  90. topJoin: '',
  91. topLeft: '',
  92. topRight: '',
  93. bottomBody: '',
  94. bottomJoin: '',
  95. bottomLeft: '',
  96. bottomRight: '',
  97. bodyLeft: '',
  98. bodyRight: '',
  99. bodyJoin: '',
  100. joinBody: '',
  101. joinLeft: '',
  102. joinRight: '',
  103. joinJoin: ''
  104. };
  105. }
  106. throw new Error('Unknown border template "' + name + '".');
  107. };
  108. var _default = getBorderCharacters;
  109. exports.default = _default;
  110. //# sourceMappingURL=getBorderCharacters.js.map