getBorderCharacters.js 2.3 KB

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