import { parse } from "@std/csv/parse";
import { assertEquals } from "@std/assert";
const string = "a,b,c\nd,e,f";
assertEquals(parse(string, { skipFirstRow: false }), [["a", "b", "c"], ["d", "e", "f"]]);
assertEquals(parse(string, { skipFirstRow: true }), [{ a: "d", b: "e", c: "f" }]);
assertEquals(parse(string, { columns: ["x", "y", "z"] }), [{ x: "a", y: "b", z: "c" }, { x: "d", y: "e", z: "f" }]);
maybe only available on jsr right now:
pnpm dlx jsr add @std/csv
maybe only available on jsr right now: