diff options
Diffstat (limited to 'node_modules/table/dist/padTableData.js')
| -rw-r--r-- | node_modules/table/dist/padTableData.js | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/node_modules/table/dist/padTableData.js b/node_modules/table/dist/padTableData.js new file mode 100644 index 00000000..a78ce49b --- /dev/null +++ b/node_modules/table/dist/padTableData.js @@ -0,0 +1,20 @@ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +/** + * @param {table~row[]} rows + * @param {Object} config + * @returns {table~row[]} + */ +exports.default = (rows, config) => { + return rows.map(cells => { + return cells.map((value, index1) => { + const column = config.columns[index1]; + + return ' '.repeat(column.paddingLeft) + value + ' '.repeat(column.paddingRight); + }); + }); +};
\ No newline at end of file |
