You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<p>This is a library that provides CSV parsing and formatting.</p>
184
183
<p><strong>NOTE</strong> As of v0.2.0 <code>fast-csv</code> supports multi-line values.</p>
@@ -188,6 +187,7 @@ <h2>Usage</h2>
188
187
<h3>Parsing</h3>
189
188
<p>All methods accept the following <code>options</code></p>
190
189
<ul>
190
+
<li><code>objectMode=true</code>: Ensure that <code>data</code> events have an object emitted rather than the stringified version set to false to have a stringified buffer.</li>
191
191
<li><code>headers=false</code>: Ste to true if you expect the first line of your <code>CSV</code> to contain headers, alternatly you can specify an array of headers to use.</li>
192
192
<li><code>ignoreEmpty=false</code>: If you wish to ignore empty rows.</li>
193
193
<li><code>delimiter=','</code>: If your data uses an alternate delimiter such as <code>;</code> or <code>\t</code>.<ul>
@@ -207,8 +207,7 @@ <h3>Parsing</h3>
207
207
</li>
208
208
</ul>
209
209
<p><strong>events</strong></p>
210
-
<p><code>parse-error</code>: Emitted if there was an error parsing a row.
211
-
<code>record</code>: Emitted when a record is parsed.
210
+
<p><code>record</code>: Emitted when a record is parsed.
212
211
<code>data-invalid</code>: Emitted if there was invalid row encounted, <strong>only emitted if the <code>validate</code> function is used</strong>.
213
212
<code>data</code>: Emitted with the <code>stringified</code> version of a record.</p>
<p>You can use <code>fast-csv</code> to pipe the output from a parsed CSV to a transformed CSV by setting the parser to <code>objectMode</code> and using <code>createWriteStream</code>.</p>
0 commit comments