Skip to content

Commit

Permalink
docs: issue 298 sample
Browse files Browse the repository at this point in the history
  • Loading branch information
wdavidw committed Oct 22, 2021
1 parent b756bd6 commit f7313bd
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions demo/issues/298.js
@@ -0,0 +1,15 @@

import {parse} from 'csv-parse/sync';

const camelCaseColumns = (header) => {
return header.map((label) => {
return label.toUpperCase();
});
};
console.log(
parse('a,b,c\n1,2,3', { encoding: 'utf8',
columns: camelCaseColumns,
// cast: castToSchema(schema),
trim: true,
})
);

0 comments on commit f7313bd

Please sign in to comment.