Software zum Installieren eines Smart-Mirror Frameworks , zum Nutzen von hochschulrelevanten Informationen, auf einem Raspberry-Pi.
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.

padTableData.js 621B

12345678910111213141516
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. exports.padTableData = exports.padString = void 0;
  4. const padString = (input, paddingLeft, paddingRight) => {
  5. return ' '.repeat(paddingLeft) + input + ' '.repeat(paddingRight);
  6. };
  7. exports.padString = padString;
  8. const padTableData = (rows, config) => {
  9. return rows.map((cells) => {
  10. return cells.map((cell, cellIndex) => {
  11. const { paddingLeft, paddingRight } = config.columns[cellIndex];
  12. return exports.padString(cell, paddingLeft, paddingRight);
  13. });
  14. });
  15. };
  16. exports.padTableData = padTableData;