Skip to content

Commit b31b729

Browse files
committed
feat(parse): comment_no_infix option
1 parent 353de57 commit b31b729

File tree

3 files changed

+28
-1
lines changed

3 files changed

+28
-1
lines changed

csv

Submodule csv updated 110 files

src/md/parse/options.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@ All options are optional. The options from the [Node.js Stream Writable](https:/
6464
* [`on_record`](/parse/options/on_record/) (function)
6565
_Since 4.7.0_
6666
Alter and filter records by executing a user defined function.
67+
* [`comment_no_infix`](/parse/options/comment_no_infix/) (boolean)
68+
_Since 5.5.0_
69+
Restricts the definition of comments to full lines.
6770
* [`quote`](/parse/options/quote/) (char|Buffer|boolean)
6871
_Since version 0.0.1_
6972
Optional character surrounding a field as one character only; disabled if null, false or empty; defaults to double quote.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
title: Option comment_no_infix
3+
navtitle: comment_no_infix
4+
description: Option "columns" generate records as object literals instead of arrays.
5+
keywords: ['csv', 'parse', 'options', 'columns']
6+
---
7+
8+
# Option `comment_no_infix`
9+
10+
The `comment_no_infix` option restricts the definition of comments to full lines. Comment characters defined in the middle of a line are not interpreted as such.
11+
12+
Comments are disabled by default. Thus, this option only takes effect when comments are activated.
13+
14+
* Type: `boolean`
15+
* Optional
16+
* Default: `false`
17+
* Since: `5.5.0`
18+
* Related: [`comment`](/parse/options/comment/) — see [Available Options](/parse/options/#available-options)
19+
20+
## Example
21+
22+
While the default behavior generates `[ [ 'a', 'b' ] ]`, activating `comment_no_infix` in the example below disregards the comment character present in the second line.
23+
24+
`embed:packages/csv-parse/samples/option.comment_no_infix.js`

0 commit comments

Comments
 (0)