3 Object.defineProperty(exports, "__esModule", {
6 exports.drawBorderTop = exports.drawBorderJoin = exports.drawBorderBottom = exports.drawBorder = void 0;
9 * @typedef drawBorder~parts
10 * @property {string} left
11 * @property {string} right
12 * @property {string} body
13 * @property {string} join
17 * @param {number[]} columnSizeIndex
18 * @param {drawBorder~parts} parts
21 const drawBorder = (columnSizeIndex, parts) => {
22 const columns = columnSizeIndex.map(size => {
23 return parts.body.repeat(size);
25 return parts.left + columns + parts.right + '\n';
28 * @typedef drawBorderTop~parts
29 * @property {string} topLeft
30 * @property {string} topRight
31 * @property {string} topBody
32 * @property {string} topJoin
36 * @param {number[]} columnSizeIndex
37 * @param {drawBorderTop~parts} parts
42 exports.drawBorder = drawBorder;
44 const drawBorderTop = (columnSizeIndex, parts) => {
45 const border = drawBorder(columnSizeIndex, {
52 if (border === '\n') {
59 * @typedef drawBorderJoin~parts
60 * @property {string} joinLeft
61 * @property {string} joinRight
62 * @property {string} joinBody
63 * @property {string} joinJoin
67 * @param {number[]} columnSizeIndex
68 * @param {drawBorderJoin~parts} parts
73 exports.drawBorderTop = drawBorderTop;
75 const drawBorderJoin = (columnSizeIndex, parts) => {
76 return drawBorder(columnSizeIndex, {
80 right: parts.joinRight
84 * @typedef drawBorderBottom~parts
85 * @property {string} topLeft
86 * @property {string} topRight
87 * @property {string} topBody
88 * @property {string} topJoin
92 * @param {number[]} columnSizeIndex
93 * @param {drawBorderBottom~parts} parts
98 exports.drawBorderJoin = drawBorderJoin;
100 const drawBorderBottom = (columnSizeIndex, parts) => {
101 return drawBorder(columnSizeIndex, {
102 body: parts.bottomBody,
103 join: parts.bottomJoin,
104 left: parts.bottomLeft,
105 right: parts.bottomRight
109 exports.drawBorderBottom = drawBorderBottom;
110 //# sourceMappingURL=drawBorder.js.map