Skip to content

Commit

Permalink
Updating docs for v1.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Dustin Smith committed Mar 31, 2016
1 parent 6aec5c2 commit 87261e3
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 2 deletions.
7 changes: 7 additions & 0 deletions History.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# v1.1.0

* Fix for when chunk returned by transform to the parser ends with a space
* Functionality to give a reason when invalid data
* Fix problem with utf8 encoded streams that have multi-byte characters
* Allow passing sparse array of headers

# v1.0.0

* Node 4 and 5 support.
Expand Down
12 changes: 12 additions & 0 deletions docs/History.html
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,18 @@



<h1 id="v1-1-0">v1.1.0</h1>
<ul>
<li>Fix for when chunk returned by transform to the parser ends with a space</li>
<li>Functionality to give a reason when invalid data</li>
<li>Fix problem with utf8 encoded streams that have multi-byte characters</li>
<li>Allow passing sparse array of headers</li>
</ul>
<h1 id="v1-0-0">v1.0.0</h1>
<ul>
<li>Node 4 and 5 support.</li>
<li>Deprecating the <code>record</code> event.</li>
</ul>
<h1 id="v0-6-0">v0.6.0</h1>
<ul>
<li>Removed try catch from emit to allow bubbling up of errors to process, if one is thrown <a href="https://github.com/C2FO/fast-csv/issues/93">#93</a><ul>
Expand Down
13 changes: 12 additions & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ <h3 id="parsing">Parsing</h3>
<p>All methods accept the following <code>options</code></p>
<ul>
<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>
<li><code>headers=false</code>: Set 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>
<li><code>headers=false</code>: Set 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. You can also specify a sparse array to omit some of the columns.</li>
<li><code>ignoreEmpty=false</code>: If you wish to ignore empty rows.</li>
<li><code>discardUnmappedColumns=false</code>: If you want to discard columns that do not map to a header.</li>
<li><code>strictColumnHandling=false</code>: If you want to consider empty lines/lines with too few fields as errors - Only to be used with <code>headers=true</code></li>
Expand Down Expand Up @@ -337,6 +337,17 @@ <h3 id="parsing">Parsing</h3>
.on(&quot;end&quot;, function(){
console.log(&quot;done&quot;);
});</code></pre>
<p>To omit some of the data columns you may not need, pass a sparse array as <code>headers</code>.</p>
<pre class='prettyprint linenums lang-js'><code class="lang-javascript">var stream = fs.createReadStream(&quot;my.csv&quot;);

csv
.fromStream(stream, {headers : [&quot;firstName&quot; , , &quot;address&quot;]})
.on(&quot;data&quot;, function(data){
console.log(data);
})
.on(&quot;end&quot;, function(){
console.log(&quot;done&quot;);
});</code></pre>
<p>If your data may include empty rows, the sort Excel might include at the end of the file for instance, you can ignore
these by including the <code>ignoreEmpty</code> option.</p>
<p>Any rows consisting of nothing but empty strings and/or commas will be skipped, without emitting a &#39;data&#39; or &#39;error&#39; event.</p>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "fast-csv",
"version": "1.0.0",
"version": "1.1.0",
"description": "CSV parser and writer",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit 87261e3

Please sign in to comment.