GRAYBYTE WORDPRESS FILE MANAGER9822

Server IP : 198.54.121.189 / Your IP : 216.73.216.224
System : Linux premium69.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
PHP Version : 7.4.33
Disable Function : NONE
cURL : ON | WGET : ON | Sudo : OFF | Pkexec : OFF
Directory : /lib/node_modules/npm/node_modules/cli-table3/src/
Upload Files :
Current_dir [ Not Writeable ] Document_root [ Writeable ]

Command :


Current File : /lib/node_modules/npm/node_modules/cli-table3/src//table.js
const utils = require('./utils');
const tableLayout = require('./layout-manager');

class Table extends Array {
  constructor(options) {
    super();

    this.options = utils.mergeOptions(options);
  }

  toString() {
    let array = this;
    let headersPresent = this.options.head && this.options.head.length;
    if (headersPresent) {
      array = [this.options.head];
      if (this.length) {
        array.push.apply(array, this);
      }
    } else {
      this.options.style.head = [];
    }

    let cells = tableLayout.makeTableLayout(array);

    cells.forEach(function(row) {
      row.forEach(function(cell) {
        cell.mergeTableOptions(this.options, cells);
      }, this);
    }, this);

    tableLayout.computeWidths(this.options.colWidths, cells);
    tableLayout.computeHeights(this.options.rowHeights, cells);

    cells.forEach(function(row) {
      row.forEach(function(cell) {
        cell.init(this.options);
      }, this);
    }, this);

    let result = [];

    for (let rowIndex = 0; rowIndex < cells.length; rowIndex++) {
      let row = cells[rowIndex];
      let heightOfRow = this.options.rowHeights[rowIndex];

      if (rowIndex === 0 || !this.options.style.compact || (rowIndex == 1 && headersPresent)) {
        doDraw(row, 'top', result);
      }

      for (let lineNum = 0; lineNum < heightOfRow; lineNum++) {
        doDraw(row, lineNum, result);
      }

      if (rowIndex + 1 == cells.length) {
        doDraw(row, 'bottom', result);
      }
    }

    return result.join('\n');
  }

  get width() {
    let str = this.toString().split('\n');
    return str[0].length;
  }
}

function doDraw(row, lineNum, result) {
  let line = [];
  row.forEach(function(cell) {
    line.push(cell.draw(lineNum));
  });
  let str = line.join('');
  if (str.length) result.push(str);
}

module.exports = Table;

[ Back ]
Name
Size
Last Modified
Owner / Group
Permissions
Options
..
--
March 03 2024 22:36:29
root / root
0755
cell.js
11.957 KB
March 10 2021 14:36:40
root / root
0644
layout-manager.js
6.215 KB
March 10 2021 14:36:40
root / root
0644
table.js
1.8 KB
March 10 2021 14:36:40
root / root
0644
utils.js
7.105 KB
March 10 2021 14:36:40
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025
CONTACT ME
Static GIF