* Build a markdown table from headers and rows.
(headers: string[], rows: string[][])
| 330 | * Build a markdown table from headers and rows. |
| 331 | */ |
| 332 | function markdownTable(headers: string[], rows: string[][]): string { |
| 333 | const separator = headers.map(() => '---') |
| 334 | return [ |
| 335 | `| ${headers.join(' | ')} |`, |
| 336 | `| ${separator.join(' | ')} |`, |
| 337 | ...rows.map(row => `| ${row.join(' | ')} |`), |
| 338 | ].join('\n') |
| 339 | } |
| 340 |
no outgoing calls
no test coverage detected