@ -333,14 +333,14 @@ var csv = Papa.unparse({
@@ -333,14 +333,14 @@ var csv = Papa.unparse({
<li><code>dynamicTyping</code> If true, numeric and boolean data will be converted to their type instead of remaining strings.</li>
<li><code>preview</code> If > 0, only that many rows will be parsed.</li>
<li><code>encoding</code> The encoding to use when opening files locally.</li>
<li><code>worker</code> Whether or not to use a <ahref="faq.html#workers">worker thread</a>. Using a worker will keep your page reactive, but may be slightly slower.</li>
<li><code>worker</code> Whether or not to use a <ahref="/faq#workers">worker thread</a>. Using a worker will keep your page reactive, but may be slightly slower.</li>
<li><code>comments</code> Specify a string that indicates a comment (like "#" or "//"). If your CSV file has commented lines, and Papa will skip them. This feature is disabled by default.</li>
</ul>
</div>
<divclass="grid-50">
<ul>
<liid="step">
<code>step</code> To <ahref="faq.html#streaming">stream</a> the input, define a callback function to receive <ahref="#results">results</a> row-by-row rather than together at the end:
<code>step</code> To <ahref="/faq#streaming">stream</a> the input, define a callback function to receive <ahref="#results">results</a> row-by-row rather than together at the end:
@ -357,7 +357,7 @@ var csv = Papa.unparse({
@@ -357,7 +357,7 @@ var csv = Papa.unparse({
</li>
<li><code>error</code> A callback to execute if FileReader encounters an error. The function should receive two arguments: the error and the File.</li>
<li><code>download</code> If true, this indicates that the string you passed in is actually a URL from which to download a file and parse it.</li>
<li><code>keepEmptyRows</code> If true, rows that are empty will be included in the results as an empty array. This is useful if you want to maintain line (or at least <i>row</i>) parity with the original input.</li>
<li><code>skipEmptyLines</code> If true, lines that are completely empty will be skipped. An empty line is defined to be one which evaluates to empty string.</li>
<li><code>chunk</code> A callback, much like step, which activates streaming and is executed after every whole chunk 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. As arguments, it receives the results, the streamer, and if parsing a local file, the File object. You can pause, resume, and abort parsing from within this function.</li>
<li><code>fastMode</code> When enabled, fast mode executes parsing much more quickly. Only use this if you know your input won't have quoted fields.
Yes. Parsing huge text files is facilitated by <i>streaming</i>, where the file is loaded a little bit at a time, parsed, and the results are sent to your <ahref="docs.html#config">step</a> callback function, row-by-row.
Yes. Parsing huge text files is facilitated by <i>streaming</i>, where the file is loaded a little bit at a time, parsed, and the results are sent to your <ahref="/docs#config">step</a> callback function, row-by-row.
</p>
<h4>How do I stream my input?</h4>
<p>
Just specify a <ahref="docs.html#config">step</a> callback function. Results will <i>not</i> be available after parsing is finished, however. You have to inspect the results one row at a time.
Just specify a <ahref="/docs#config">step</a> callback function. Results will <i>not</i> be available after parsing is finished, however. You have to inspect the results one row at a time.
</p>
<h4>What is a stream and when should I stream files?</h4>
@ -165,7 +165,7 @@
@@ -165,7 +165,7 @@
<h4>Can I pause and resume parsing?</h4>
<p>
Yes, as long as you are streaming and not using a worker. Your <ahref="/docs.html#step">step callback</a> is passed a ParserHandle which has pause, resume, and abort functions.
Yes, as long as you are streaming and not using a worker. Your <ahref="/docs#step">step callback</a> is passed a ParserHandle which has pause, resume, and abort functions.
</p>
@ -186,7 +186,7 @@
@@ -186,7 +186,7 @@
<h4>How do I use a worker?</h4>
<p>
Just specify <code>worker: true</code> in your <ahref="docs.html#config">config</a>. You'll also need to make a <code>complete</code> callback (unless you're streaming) so that you can get the results, because using a worker makes the parse function asynchronous.
Just specify <code>worker: true</code> in your <ahref="/docs#config">config</a>. You'll also need to make a <code>complete</code> callback (unless you're streaming) so that you can get the results, because using a worker makes the parse function asynchronous.