Skip to main content

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

NameTypeDescription
textstringThe CSV string to parse.
options?ObjectThe options for parsing the CSV string.
options.separator?string-

Returns

any[][]

An array of arrays representing the CSV data.

Description

将 CSV 字符串解析为数组的数组。

Defined in

src/modules/utils/csv.d.ts:22


parseCsvStringWithHeader

parseCsvStringWithHeader(text, options?): object[]

Parse a CSV string with a header row and return an array of objects.

Parameters

NameTypeDescription
textstringThe CSV string to parse.
options?ObjectThe options for parsing the CSV string.
options.separator?string-

Returns

object[]

An array of objects representing the CSV data.

Description

解析具有标题行的 CSV 字符串并返回对象数组。

Defined in

src/modules/utils/csv.d.ts:34