Skip to main content
Module

std/encoding/csv.ts>parse

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

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

Parameters

input: string | BufReader

Input to parse. Can be a string or BufReader.

optional
opt: ParseOptions = [UNSUPPORTED]

options of the parser.

Returns

Promise<unknown[]>

If you don't provide both opt.header and opt.parse, it returns string[][]. If you provide opt.header but not opt.parse, it returns object[]. If you provide opt.parse, it returns an array where each element is the value returned from opt.parse.