tw5-typed / modules/utils/csv
Module: modules/utils/csv
Table of contents
Interfaces
Functions
Functions
parseCsvString
▸ parseCsvString(text, options?): any[][]
Parse a CSV string into an array of arrays.
Parameters
| Name | Type | Description |
|---|---|---|
text | string | The CSV string to parse. |
options? | Object | The options for parsing the CSV string. |
options.separator? | string | - |
Returns
any[][]
An array of arrays representing the CSV data.
Description
将 CSV 字符串解析为数组的数组。
Defined in
parseCsvStringWithHeader
▸ parseCsvStringWithHeader(text, options?): object[]
Parse a CSV string with a header row and return an array of objects.
Parameters
| Name | Type | Description |
|---|---|---|
text | string | The CSV string to parse. |
options? | Object | The options for parsing the CSV string. |
options.separator? | string | - |
Returns
object[]
An array of objects representing the CSV data.
Description
解析具有标题行的 CSV 字符串并返回对象数组。