mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-22 19:19:52 +02:00
10 lines
324 B
TypeScript
10 lines
324 B
TypeScript
export type TableInputEntry = [string, string | number] | [];
|
|
export type TableInput = TableInputEntry[];
|
|
|
|
export default function cleanTable(input: TableInput) {
|
|
return input
|
|
.filter((array) => array[1] !== undefined)
|
|
.map((array) => (array.length === 0 ? '' : `**${array[0]}**: ${array[1]}`))
|
|
.join('\n');
|
|
}
|