Browse Source

Added doc for forceUniformNewline option

pull/845/head
Khoi Pham 4 years ago
parent
commit
82a9e5346a
  1. 1
      .gitignore
  2. 13
      docs/docs.html
  3. 7
      papaparse.min.js

1
.gitignore vendored

@ -3,3 +3,4 @@ bower_components/
node_modules/ node_modules/
package-lock.json package-lock.json
yarn.lock yarn.lock
papaparse.min.js

13
docs/docs.html

@ -449,7 +449,8 @@ var csv = Papa.unparse({
beforeFirstChunk: undefined, beforeFirstChunk: undefined,
withCredentials: undefined, withCredentials: undefined,
transform: undefined, transform: undefined,
delimitersToGuess: [',', '\t', '|', ';', <a href="#readonly">Papa.RECORD_SEP</a>, <a href="#readonly">Papa.UNIT_SEP</a>] delimitersToGuess: [',', '\t', '|', ';', <a href="#readonly">Papa.RECORD_SEP</a>, <a href="#readonly">Papa.UNIT_SEP</a>],
forceUniformNewline: undefined
}</code></pre> }</code></pre>
</div> </div>
<div class="clear"></div> <div class="clear"></div>
@ -477,7 +478,7 @@ var csv = Papa.unparse({
<code>newline</code> <code>newline</code>
</td> </td>
<td> <td>
The newline sequence. Leave blank to auto-detect. Must be one of \r, \n, or \r\n. The newline sequence. Leave blank to auto-detect. Must be one of \r, \n, or \r\n. If you are working with file where newline characters vary then you can try setting <code>forceUniformNewline</code> to <code>true</code> to make sure there is only one variant before parsing.
</td> </td>
</tr> </tr>
<tr> <tr>
@ -680,6 +681,14 @@ var csv = Papa.unparse({
An array of delimiters to guess from if the <code>delimiter</code> option is not set. An array of delimiters to guess from if the <code>delimiter</code> option is not set.
</td> </td>
</tr> </tr>
<tr>
<td>
<code>forceUniformNewline</code>
</td>
<td>
When set to <code>true</code> replace all newline characters no matter what variant (\r, \n or \r\n) in the file to current <code>newline</code> before parsing. This is useful when newline characters vary in a file leading to inaccurate parsing. Use this with care however because this option will also replace quoted newline characters.
</td>
</tr>
</table> </table>
</div> </div>
</div> </div>

7
papaparse.min.js vendored

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save