3 Object.defineProperty(exports, "__esModule", {
6 exports.default = void 0;
8 var _stringWidth = _interopRequireDefault(require("string-width"));
10 var _alignString = _interopRequireDefault(require("./alignString"));
12 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15 * @param {table~row[]} rows
16 * @param {object} config
17 * @returns {table~row[]}
19 const alignTableData = (rows, config) => {
20 return rows.map(cells => {
21 return cells.map((value, index1) => {
22 const column = config.columns[index1];
24 if ((0, _stringWidth.default)(value) === column.width) {
27 return (0, _alignString.default)(value, column.width, column.alignment);
33 var _default = alignTableData;
34 exports.default = _default;
35 //# sourceMappingURL=alignTableData.js.map