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.113.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 opt.skipFirstRow, opt.parse, and opt.columns, it returns string[][]. If you provide opt.skipFirstRow or opt.columns 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.