Skip to content

Commit 67053ab

Browse files
committed
docs(csv-parse): raw sample
1 parent 021dfc9 commit 67053ab

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed
+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
2+
import assert from 'assert';
3+
import { parse } from 'csv-parse';
4+
5+
parse(`
6+
a,b,c
7+
d,e,f
8+
`.trim(), {raw: true}, (err, records) => {
9+
assert.deepStrictEqual(records, [
10+
{ record: [ 'a', 'b', 'c' ], raw: 'a,b,c\n' },
11+
{ record: [ 'd', 'e', 'f' ], raw: 'd,e,f' }
12+
])
13+
})

0 commit comments

Comments
 (0)