Function tsvFormatRows

  • Formats the specified array of array of string rows as tab-separated values, returning a string. This operation is the reverse of tsvParseRows. Each row will be separated by a newline (\n), and each column within each row will be separated by the tab-delimiter. Values that contain either the tab-delimiter, a double-quote (") or a newline will be escaped using double-quotes.

    To convert an array of objects to an array of arrays while explicitly specifying the columns, use array.map. If you like, you can also array.concat this result with an array of column names to generate the first row.

    Equivalent to dsvFormat("\t").formatRows.

    Parameters

    • rows: readonly string[][]

      An array of array of string rows.

    Returns string