Browse Source

Added doc for the onlyQuoteStrings property

pull/534/head
Dennis Boldt 7 years ago
parent
commit
2c9b709f74
  1. 44
      docs/docs.html

44
docs/docs.html

@ -7,12 +7,12 @@ @@ -7,12 +7,12 @@
<meta name="theme-color" content="#ffffff">
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css">
<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Arvo|Source+Sans+Pro:400,400italic,700|Lato:300,400">
<link rel="stylesheet" href="/resources/css/unsemantic.css">
<link rel="stylesheet" href="/resources/css/tomorrow.highlight.css">
<link rel="stylesheet" href="/resources/css/common.css">
<script src="/resources/js/jquery.min.js"></script>
<script src="/resources/js/highlight.min.js"></script>
<script src="/resources/js/common.js"></script>
<link rel="stylesheet" href="resources/css/unsemantic.css">
<link rel="stylesheet" href="resources/css/tomorrow.highlight.css">
<link rel="stylesheet" href="resources/css/common.css">
<script src="resources/js/jquery.min.js"></script>
<script src="resources/js/highlight.min.js"></script>
<script src="resources/js/common.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
</head>
<body>
@ -247,13 +247,37 @@ @@ -247,13 +247,37 @@
<pre><code class="language-javascript">// defaults shown
{
quotes: false,
onlyQuoteStrings: false,
quoteChar: '"',
escapeChar: '"',
delimiter: ",",
header: true,
newline: "\r\n"
newline: "\r\n",
header: true
}</code></pre>
Set <code>quotes</code> to <code>true</code> to always enclose each field in quotes, or an array of true/false values correlating to specific to columns to force-quote. The character used to quote can be customized using <code>quoteChar</code>. The character used to escape the <code>quoteChar</code> within a field can be customized using <code>escapeChar</code>. The <code>delimiter</code> can be any valid delimiting character. The <code>newline</code> character(s) may also be customized. Setting <code>header</code> to <code>false</code> will omit the header row.
<ul>
<li>
<code>quotes</code>: Set this property to <code>true</code> to always enclose each field in quotes, or an array of true/false values correlating to specific to columns to force-quote (e.g., <code>[true, false, true]</code>).
</li>
<li>
<code>onlyQuoteStrings</code>: Setting this property to <code>true</code> will just quote strings in the resulting CSV. All other data types like numbers or booleans will not be quoted. Note, that this property overrides the <code>quotes</code> property.
</li>
<li>
<code>quoteChar</code>: The character used to quote.
</li>
<li>
<code>escapeChar</code>: The character used to escape the <code>quoteChar</code> within a field.
</li>
<li>
<code>delimiter</code>: This property can be any valid delimiting character.
</li>
<li>
<code>newline</code>: This property can be any valid newline character(s).
</li>
<li>
<code>header</code>: Setting this property to <code>false</code> will omit the header row.
</li>
</ul>
</li>
</ul>
</div>
@ -803,7 +827,7 @@ var csv = Papa.unparse({ @@ -803,7 +827,7 @@ var csv = Papa.unparse({
<footer>
<!--<div class="footer-top">
<h3>Make Your Papa Proud</h3>
<h4><a href="https://github.com/mholt/PapaParse">Star</a> and <a href="https://github.com/mholt/PapaParse/blob/gh-pages/resources/js/lovers.js">shout</a> if you love #PapaParse</h4>
<h4><a href="https://github.com/mholt/PapaParse">Star</a> and <a href="https://github.com/mholt/PapaParse/blob/gh-pagesresources/js/lovers.js">shout</a> if you love #PapaParse</h4>
</div>-->
<div class="footer-main">
<div class="grid-container">

Loading…
Cancel
Save