You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

пре 3 година
1234567891011121314151617181920
  1. 'use strict';
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. /**
  6. * @param {table~row[]} rows
  7. * @param {Object} config
  8. * @returns {table~row[]}
  9. */
  10. exports.default = (rows, config) => {
  11. return rows.map(cells => {
  12. return cells.map((value, index1) => {
  13. const column = config.columns[index1];
  14. return ' '.repeat(column.paddingLeft) + value + ' '.repeat(column.paddingRight);
  15. });
  16. });
  17. };