mirror of
https://gitlab.com/MrFry/mrfrys-node-server
synced 2025-04-01 20:24:18 +02:00
p2p fixes
This commit is contained in:
parent
2edc87d5dd
commit
16d6f04936
17 changed files with 707 additions and 582 deletions
|
@ -421,12 +421,13 @@ function C(color?: string): string {
|
|||
|
||||
function logTable(
|
||||
table: (string | number)[][],
|
||||
options: { colWidth?: number[] } = {}
|
||||
options: { colWidth?: number[]; rowPrefix?: string } = {}
|
||||
): void {
|
||||
const { colWidth, rowPrefix } = options
|
||||
|
||||
table.forEach((row, i) => {
|
||||
const rowString: string[] = []
|
||||
row.forEach((cell, j) => {
|
||||
const { colWidth } = options
|
||||
const cellColor = j === 0 || i === 0 ? 'blue' : 'green'
|
||||
let cellVal = ''
|
||||
if (!isNaN(+cell)) {
|
||||
|
@ -447,7 +448,7 @@ function logTable(
|
|||
|
||||
rowString.push(C(cellColor) + cellVal + C())
|
||||
})
|
||||
Log(rowString.join('\t'))
|
||||
Log((rowPrefix || '') + rowString.join('\t'))
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue