We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The code below logs [{NAME: "NAME", ADDRESS: "ADDRESS"},{NAME: "John", ADDRESS: "Main Street"}], rather than the expected [{NAME: "John", ADDRESS: "Main Street"}].
[{NAME: "NAME", ADDRESS: "ADDRESS"},{NAME: "John", ADDRESS: "Main Street"}]
[{NAME: "John", ADDRESS: "Main Street"}]
const csv = fs.readFileSync("data.csv"); // NAME;ADDRESS\John;Main Street neatCsv(csv, { headers: [ "NAME", "ADDRESS" ], separator: ";" }).then(console.log);
The text was updated successfully, but these errors were encountered:
You only have to provide the headers if the first row in the CSV file doesn't.
await neatCsv('NAME;ADDRESS\nJohn;Main Street', { separator: ';' }); //=> [{ NAME: 'John', ADDRESS: 'Main Street' }];
Sorry, something went wrong.
No branches or pull requests
The code below logs
[{NAME: "NAME", ADDRESS: "ADDRESS"},{NAME: "John", ADDRESS: "Main Street"}]
, rather than the expected[{NAME: "John", ADDRESS: "Main Street"}]
.The text was updated successfully, but these errors were encountered: