Skip to content

Commit 86cd503

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

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
@@ -31,6 +31,9 @@ All options are optional. The options from the [Node.js Stream Writable](https:/
3131
* [`comment`](/parse/options/comment/) (string|buffer)
3232
_Since early days_
3333
Treat all the characters after this one as a comment; one or multiple characters; disabled by default by defining an empty string `""`.
34+
* [`comment_no_infix`](/parse/options/comment_no_infix/) (boolean)
35+
_Since 5.5.0_
36+
Restricts the definition of comments to full lines.
3437
* [`delimiter`](/parse/options/delimiter/) (string|Buffer|[string|Buffer])
3538
_Since version 0.0.1_
3639
Set one or several field delimiters containing one or several characters. It defaults to `,` (comma).
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)