The input 2D array.
The delimiter to use for separating values in the CSV string.
The character used to replace line breaks in the CSV string. Defaults to '|'.
The CSV string representation of the input array.
This function is useful for exporting data to CSV format.
T - The type of the elements in the input array.
const input = [
['Name', 'Age', 'Country'],
['John', '25', 'USA'],
['Alice', '30', 'Canada'],
['Bob', '35', 'UK'],
];
arrTableToCsv(input);
//=> "Name;Age;Country\nJohn;25;USA\nAlice;30;Canada\nBob;35;UK"
Generated using TypeDoc
Converts a 2D array to a CSV string.