alignTableData.js 480 B

12345678910111213
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. exports.alignTableData = void 0;
  4. const alignString_1 = require("./alignString");
  5. const alignTableData = (rows, config) => {
  6. return rows.map((row) => {
  7. return row.map((cell, cellIndex) => {
  8. const { width, alignment } = config.columns[cellIndex];
  9. return alignString_1.alignString(cell, width, alignment);
  10. });
  11. });
  12. };
  13. exports.alignTableData = alignTableData;