import { parse } from "https://deno.land/std@0.218.0/csv/parse.ts";
Csv parse helper to manipulate data. Provides an auto/custom mapper for columns.
Examples
Example 1
Example 1
import { parse } from "https://deno.land/std@0.218.0/csv/parse.ts";
const string = "a,b,c\nd,e,f";
console.log(
await parse(string, {
skipFirstRow: false,
}),
);
// output:
// [["a", "b", "c"], ["d", "e", "f"]]
Csv parse helper to manipulate data. Provides an auto/custom mapper for columns.
Examples
Example 1
Example 1
import { parse } from "https://deno.land/std@0.218.0/csv/parse.ts";
const string = "a,b,c\nd,e,f";
console.log(
await parse(string, {
skipFirstRow: false,
}),
);
// output:
// [["a", "b", "c"], ["d", "e", "f"]]
Type Parameters
T extends ParseOptions
Parameters
opt: T
options of the parser.
Returns
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, unknown>[]
.