Skip to content
This repository was archived by the owner on Jun 28, 2021. It is now read-only.

Commit 38f6cbb

Browse files
committed
delimiter: new sample
1 parent a293216 commit 38f6cbb

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@
1010
* promise: new API module
1111
* errors: finish normalisation of all errors
1212

13+
## Trunk
14+
15+
Minor improvements:
16+
* delimiter: new sample
17+
1318
## Version 4.9.0
1419

1520
New Feature:

samples/option.delimiter.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
2+
const parse = require('../lib/sync')
3+
const assert = require('assert')
4+
5+
const data = 'a key => a value'
6+
const records = parse(data, {
7+
delimiter: "=>",
8+
trim: true
9+
})
10+
assert.deepEqual(records, [
11+
[ "a key", "a value" ]
12+
])

0 commit comments

Comments
 (0)