Skip to content

Commit e7617da

Browse files
committed
docs(csv-parse): quote samples
1 parent 2ca7921 commit e7617da

File tree

3 files changed

+32
-2
lines changed

3 files changed

+32
-2
lines changed

packages/csv-parse/samples/option.on_record.filter.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ line 3
1212
}, function(err, records){
1313
assert.deepStrictEqual(
1414
records, [
15-
[`line 1`],
16-
[`line 3`]
15+
['line 1'],
16+
['line 3']
1717
]
1818
);
1919
});
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
2+
import assert from 'assert';
3+
import { parse } from 'csv-parse/sync';
4+
5+
const records = parse(`
6+
a,"b",c
7+
"d",e,"f"
8+
`.trim());
9+
10+
assert.deepStrictEqual(
11+
records, [
12+
['a', 'b', 'c'],
13+
['d', 'e', 'f']
14+
]
15+
);
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
2+
import assert from 'assert';
3+
import { parse } from 'csv-parse/sync';
4+
5+
const records = parse(`
6+
a,"b""b",c
7+
d,"e""e",f
8+
`.trim());
9+
10+
assert.deepStrictEqual(
11+
records, [
12+
['a', 'b"b', 'c'],
13+
['d', 'e"e', 'f']
14+
]
15+
);

0 commit comments

Comments
 (0)