Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

std/encoding/csv.ts>parse

Deno standard library
Go to Latest
The Standard Library has been moved to JSR. See the blog post for details.
function parse
import { parse } from "https://deno.land/std@0.81.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.