Closed aadilmehrajbhat closed 1 year ago
I am unable to generate the CSV using WHATWG Async Parser available in v7.0.0. I have also included the codesandbox link for reference: https://codesandbox.io/s/whatwg-parser-2rz8ty
import { AsyncParser } from "@json2csv/whatwg"; const data = [ { carModel: "Audi", price: 0, colors: ["blue", "green", "yellow"] }, { carModel: "BMW", price: 15000, colors: ["red", "blue"] }, { carModel: "Mercedes", price: 20000, colors: "yellow" }, { carModel: "Porsche", price: 30000, colors: ["green", "teal", "aqua"] }, { carModel: "Tesla", price: 50000, colors: [] } ]; (async () => { const opts = {}; const transformOpts = {}; const asyncOpts = {}; const parser = new AsyncParser(opts, transformOpts, asyncOpts); const csv = await parser.parse(data).promise(); document.body.innerText = csv; })();
Good catch!
Fixed on v7.0.1. See https://codesandbox.io/s/whatwg-parser-forked-mc9j6f
I am unable to generate the CSV using WHATWG Async Parser available in v7.0.0. I have also included the codesandbox link for reference: https://codesandbox.io/s/whatwg-parser-2rz8ty