(columns, formatFn)
| 16492 | return this.toMarkdownTableAdvanced(this._getUnionNames(), val => val) |
| 16493 | } |
| 16494 | toMarkdownTableAdvanced(columns, formatFn) { |
| 16495 | const matrix = this._getMatrix(columns) |
| 16496 | const empty = columns.map(col => "-") |
| 16497 | matrix.unshift(empty) |
| 16498 | matrix.unshift(columns) |
| 16499 | const lines = matrix.map((row, rowIndex) => { |
| 16500 | const formattedValues = row.map((val, colIndex) => formatFn(val, rowIndex, colIndex)) |
| 16501 | return `|${formattedValues.join("|")}|` |
| 16502 | }) |
| 16503 | return lines.join("\n") |
| 16504 | } |
| 16505 | get asTsv() { |
| 16506 | return this.toDelimited("\t") |
| 16507 | } |
no test coverage detected