Skip to content

Commit b8fc9f4

Browse files
committed
docs(csv-parse): use bom in file recipe
1 parent 5f4dbc9 commit b8fc9f4

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

packages/csv-parse/samples/recipe.file.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ await fs.writeFile(`${os.tmpdir()}/input.csv`, [
1717
// Read the content
1818
const content = await fs.readFile(`${os.tmpdir()}/input.csv`);
1919
// Parse the CSV content
20-
const records = parse(content);
20+
const records = parse(content, {bom: true});
2121
// Validate the records
2222
assert.deepStrictEqual(records, [
23-
[ 'a', '1' ],
23+
[ 'a', '1' ],
2424
[ 'b', '2' ]
2525
]);
2626
/* hide-next-line */

0 commit comments

Comments
 (0)