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.

23 lines
555 B

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