skipEmptyLines: false, //other option is 'greedy', meaning skip delimiters, quotes, and whitespace.
columns: null //or array of strings
}
</code></pre>
@ -318,7 +318,7 @@
@@ -318,7 +318,7 @@
<code>newline</code>
</td>
<td>
The newline sequence. Must be one of <code>"\r"</code>, <code>"\n"</code>, or<code>"\r\n"</code>.
The character used to determine newline sequence. It defaults to<code>"\r\n"</code>.
</td>
</tr>
<tr>
@ -337,6 +337,14 @@
@@ -337,6 +337,14 @@
If <code>data</code> is an array of objects this option can be used to manually specify the keys (columns) you expect in the objects. If not set the keys of the first objects are used as column.
</td>
</tr>
<tr>
<td>
<code>escapeFormulae</code>
</td>
<td>
If <code>true</code>, field values that begin with <code>=</code>, <code>+</code>, <code>-</code>, or <code>@</code>, will be prepended with a <code>'</code> to defend against <ahref="https://www.contextis.com/en/blog/comma-separated-vulnerabilities"target="_blank"rel="noopener">injection attacks</a>, because Excel and LibreOffice will automatically parse such cells as formulae.
</td>
</tr>
</table>
</div>
<divclass="clear"></div>
@ -433,8 +441,10 @@ var csv = Papa.unparse({
@@ -433,8 +441,10 @@ var csv = Papa.unparse({
error: undefined,
download: false,
downloadRequestHeaders: undefined,
downloadRequestBody: undefined,
skipEmptyLines: false,
chunk: undefined,
chunkSize: undefined,
fastMode: undefined,
beforeFirstChunk: undefined,
withCredentials: undefined,
@ -499,7 +509,7 @@ var csv = Papa.unparse({
@@ -499,7 +509,7 @@ var csv = Papa.unparse({
<code>transformHeader</code>
</td>
<td>
A function to apply on each header. Requires <code>header</code> to be <code>true</code>. The function receives the header as its first argument.<br>
A function to apply on each header. Requires <code>header</code> to be <code>true</code>. The function receives the header as its first argument and the index as second.<br>
Only available starting with version 5.0.
</td>
</tr>
@ -598,6 +608,14 @@ var csv = Papa.unparse({
@@ -598,6 +608,14 @@ var csv = Papa.unparse({
}</code>
</pre>
</tr>
<tr>
<td>
<code>downloadRequestBody</code>
</td>
<td>
Use POST request on the URL of the download option. The value passed will be set as the body of the request.
</td>
</tr>
<tr>
<td>
<code>skipEmptyLines</code>
@ -614,6 +632,14 @@ var csv = Papa.unparse({
@@ -614,6 +632,14 @@ var csv = Papa.unparse({
A callback function, identical to step, which activates streaming. However, this function is executed after every <i>chunk</i> of the file is loaded and parsed rather than every row. Works only with local and remote files. Do not use both chunk and step callbacks together. For the function signature, see the documentation for the step function.
</td>
</tr>
<tr>
<td>
<code>chunkSize</code>
</td>
<td>
Overrides <code>Papa.LocalChunkSize</code> and <code>Papa.RemoteChunkSize</code>. See <ahref="#configurable">configurable</a> section to know the usage of both parameters.
"description":"Fast and powerful CSV parser for the browser that supports web workers and streaming large files. Converts CSV to JSON and JSON to CSV.",