Module

std/encoding/csv.ts>parse

Deno standard library
Go to Latest
function parse
import { parse } from "https://deno.land/std@0.158.0/encoding/csv.ts";

Csv parse helper to manipulate data. Provides an auto/custom mapper for columns.

Parameters

input: string

Input to parse.

Returns

string[][]

If you don't provide opt.skipFirstRow and opt.columns, it returns string[][]. If you provide opt.skipFirstRow or opt.columns, it returns Record<string, unkown>[].

Parameters

input: string
opt: Omit<ParseOptions, "columns" | "skipFirstRow">

Returns

string[][]

Parameters

input: string
opt: Omit<ParseOptions, "columns"> & { columns: string[]; }

Returns

Record<string, unknown>[]

Parameters

input: string
opt: Omit<ParseOptions, "skipFirstRow"> & { skipFirstRow: true; }

Returns

Record<string, unknown>[]

Parameters

input: string

Returns

string[][] | Record<string, unknown>[]