UNPKG

555 BJavaScriptView Raw
1"use strict";
2
3Object.defineProperty(exports, "__esModule", {
4 value: true
5});
6exports.default = void 0;
7
8/**
9 * @param {table~row[]} rows
10 * @param {Object} config
11 * @returns {table~row[]}
12 */
13const padTableData = (rows, config) => {
14 return rows.map(cells => {
15 return cells.map((value, index1) => {
16 const column = config.columns[index1];
17 return ' '.repeat(column.paddingLeft) + value + ' '.repeat(column.paddingRight);
18 });
19 });
20};
21
22var _default = padTableData;
23exports.default = _default;
24//# sourceMappingURL=padTableData.js.map
\No newline at end of file