3 Object.defineProperty(exports, "__esModule", {
7 var _stringWidth = require('string-width');
9 var _stringWidth2 = _interopRequireDefault(_stringWidth);
11 var _alignString = require('./alignString');
13 var _alignString2 = _interopRequireDefault(_alignString);
15 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
18 * @param {table~row[]} rows
19 * @param {Object} config
20 * @returns {table~row[]}
22 exports.default = (rows, config) => {
23 return rows.map(cells => {
24 return cells.map((value, index1) => {
25 const column = config.columns[index1];
27 if ((0, _stringWidth2.default)(value) === column.width) {
30 return (0, _alignString2.default)(value, column.width, column.alignment);