import { type ParseOptions } from "https://deno.land/std@0.56.0/encoding/csv.ts";
Properties
If a boolean is provided, the first line will be used as Header definitions.
If string[]
or HeaderOptions[]
those names will be used for header definition.
Parse function for rows. Example: const r = await parseFile('a,b,c\ne,f,g\n', { header: ["this", "is", "sparta"], parse: (e: Record<string, unknown>) => { return { super: e.this, street: e.is, fighter: e.sparta }; } }); // output [ { super: "a", street: "b", fighter: "c" }, { super: "e", street: "f", fighter: "g" } ]