convert-csv-to-json 4.13.0 → 4.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/ci-cd.yml +1 -1
- package/docs/api/BrowserApi.html +1255 -1028
- package/docs/api/BrowserApiError.html +326 -179
- package/docs/api/ConfigurationError.html +375 -224
- package/docs/api/CsvFormatError.html +334 -187
- package/docs/api/CsvParsingError.html +259 -132
- package/docs/api/CsvToJson.html +1545 -1314
- package/docs/api/CsvToJsonAsync.html +1356 -1148
- package/docs/api/FileOperationError.html +213 -101
- package/docs/api/FileUtils.html +568 -430
- package/docs/api/InputValidationError.html +229 -115
- package/docs/api/JsonUtil.html +222 -110
- package/docs/api/JsonValidationError.html +197 -87
- package/docs/api/StringUtils.html +833 -0
- package/docs/api/global.html +1537 -1354
- package/docs/api/index.html +114 -26
- package/docs/api/index.js.html +137 -31
- package/docs/api/scripts/app.min.js +1 -0
- package/docs/api/scripts/linenumber.js +10 -9
- package/docs/api/scripts/search.js +39 -0
- package/docs/api/src_browserApi.js.html +120 -29
- package/docs/api/src_csvToJson.js.html +119 -28
- package/docs/api/src_csvToJsonAsync.js.html +118 -27
- package/docs/api/src_util_errors.js.html +126 -28
- package/docs/api/src_util_fileUtils.js.html +117 -26
- package/docs/api/src_util_jsonUtils.js.html +117 -26
- package/docs/api/src_util_stringUtils.js.html +121 -27
- package/docs/api/styles/app.min.css +1 -0
- package/docs/api/styles/iframe.css +13 -0
- package/docs/api/styles/reset.css +44 -0
- package/eslint.config.js +115 -0
- package/index.js +21 -5
- package/jsdoc.json +29 -4
- package/package.json +5 -3
- package/src/browserApi.js +4 -3
- package/src/csvToJson.js +3 -2
- package/src/csvToJsonAsync.js +2 -1
- package/src/util/errors.js +10 -2
- package/src/util/fileUtils.js +1 -0
- package/src/util/jsonUtils.js +1 -0
- package/src/util/stringUtils.js +5 -1
- package/.eslintignore +0 -3
- package/.eslintrc.json +0 -48
- package/docs/api/fonts/OpenSans-Bold-webfont.eot +0 -0
- package/docs/api/fonts/OpenSans-Bold-webfont.svg +0 -1830
- package/docs/api/fonts/OpenSans-Bold-webfont.woff +0 -0
- package/docs/api/fonts/OpenSans-BoldItalic-webfont.eot +0 -0
- package/docs/api/fonts/OpenSans-BoldItalic-webfont.svg +0 -1830
- package/docs/api/fonts/OpenSans-BoldItalic-webfont.woff +0 -0
- package/docs/api/fonts/OpenSans-Italic-webfont.eot +0 -0
- package/docs/api/fonts/OpenSans-Italic-webfont.svg +0 -1830
- package/docs/api/fonts/OpenSans-Italic-webfont.woff +0 -0
- package/docs/api/fonts/OpenSans-Light-webfont.eot +0 -0
- package/docs/api/fonts/OpenSans-Light-webfont.svg +0 -1831
- package/docs/api/fonts/OpenSans-Light-webfont.woff +0 -0
- package/docs/api/fonts/OpenSans-LightItalic-webfont.eot +0 -0
- package/docs/api/fonts/OpenSans-LightItalic-webfont.svg +0 -1835
- package/docs/api/fonts/OpenSans-LightItalic-webfont.woff +0 -0
- package/docs/api/fonts/OpenSans-Regular-webfont.eot +0 -0
- package/docs/api/fonts/OpenSans-Regular-webfont.svg +0 -1831
- package/docs/api/fonts/OpenSans-Regular-webfont.woff +0 -0
- package/docs/api/scripts/prettify/Apache-License-2.0.txt +0 -202
- package/docs/api/scripts/prettify/lang-css.js +0 -2
- package/docs/api/scripts/prettify/prettify.js +0 -28
- package/docs/api/styles/jsdoc-default.css +0 -358
package/docs/api/CsvToJson.html
CHANGED
|
@@ -1,26 +1,107 @@
|
|
|
1
1
|
<!DOCTYPE html>
|
|
2
2
|
<html lang="en">
|
|
3
|
+
|
|
3
4
|
<head>
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
5
|
+
|
|
6
|
+
<meta charset="utf-8">
|
|
7
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
8
|
+
<title> CsvToJson</title>
|
|
9
|
+
|
|
10
|
+
<script src="https://cdn.jsdelivr.net/gh/google/code-prettify@master/loader/run_prettify.js"></script>
|
|
11
|
+
<script src="https://unpkg.com/@babel/standalone/babel.min.js"></script>
|
|
12
|
+
<script src="./build/entry.js"></script>
|
|
13
|
+
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
|
|
14
|
+
<!--[if lt IE 9]>
|
|
15
|
+
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
|
16
|
+
<![endif]-->
|
|
17
|
+
<link href="https://fonts.googleapis.com/css?family=Roboto:100,400,700|Inconsolata,700" rel="stylesheet">
|
|
18
|
+
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.6.3/css/all.css" integrity="sha384-UHRtZLI+pbxtHCWp1t77Bi1L4ZtiqrqD80Kn4Z8NTSRyMA2Fd33n5dQ8lWUE00s/" crossorigin="anonymous">
|
|
19
|
+
<link type="text/css" rel="stylesheet" href="https://jmblog.github.io/color-themes-for-google-code-prettify/themes/tomorrow-night.min.css">
|
|
20
|
+
<link type="text/css" rel="stylesheet" href="styles/app.min.css">
|
|
21
|
+
<link type="text/css" rel="stylesheet" href="styles/iframe.css">
|
|
22
|
+
<link type="text/css" rel="stylesheet" href="./node_modules/better-docs/css/better-docs.css">
|
|
23
|
+
<script async defer src="https://buttons.github.io/buttons.js"></script>
|
|
24
|
+
|
|
25
|
+
|
|
14
26
|
</head>
|
|
15
27
|
|
|
16
|
-
<body>
|
|
17
|
-
|
|
18
|
-
<div id="main">
|
|
19
28
|
|
|
20
|
-
<h1 class="page-title">Class: CsvToJson</h1>
|
|
21
29
|
|
|
30
|
+
<body class="layout small-header">
|
|
31
|
+
<div id="stickyNavbarOverlay"></div>
|
|
22
32
|
|
|
23
33
|
|
|
34
|
+
<div class="top-nav">
|
|
35
|
+
<div class="inner">
|
|
36
|
+
<a id="hamburger" role="button" class="navbar-burger" aria-label="menu" aria-expanded="false">
|
|
37
|
+
<span aria-hidden="true"></span>
|
|
38
|
+
<span aria-hidden="true"></span>
|
|
39
|
+
<span aria-hidden="true"></span>
|
|
40
|
+
</a>
|
|
41
|
+
<div class="logo">
|
|
42
|
+
|
|
43
|
+
<a class="image" href="index.html">
|
|
44
|
+
<img src="https://raw.githubusercontent.com/iuccio/CSVtoJSON/master/CSVtoJSON.png" alt="logo">
|
|
45
|
+
</a>
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
<a href="index.html">
|
|
49
|
+
<h1 class="navbar-item">Convert CSV to JSON</h1>
|
|
50
|
+
</a>
|
|
51
|
+
|
|
52
|
+
</div>
|
|
53
|
+
<div class="menu">
|
|
54
|
+
|
|
55
|
+
<div class="navigation">
|
|
56
|
+
<a
|
|
57
|
+
href="index.html"
|
|
58
|
+
class="link"
|
|
59
|
+
>
|
|
60
|
+
Documentation
|
|
61
|
+
</a>
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
<a
|
|
66
|
+
class="link user-link "
|
|
67
|
+
href="https://github.com/iuccio/CSVtoJSON"
|
|
68
|
+
>
|
|
69
|
+
GitHub
|
|
70
|
+
</a>
|
|
71
|
+
|
|
72
|
+
<a
|
|
73
|
+
class="link user-link "
|
|
74
|
+
href="https://www.npmjs.com/package/convert-csv-to-json"
|
|
75
|
+
>
|
|
76
|
+
NPM
|
|
77
|
+
</a>
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
</div>
|
|
82
|
+
</div>
|
|
83
|
+
</div>
|
|
84
|
+
</div>
|
|
85
|
+
<div id="main">
|
|
86
|
+
<div
|
|
87
|
+
class="sidebar "
|
|
88
|
+
id="sidebarNav"
|
|
89
|
+
>
|
|
90
|
+
|
|
91
|
+
<nav>
|
|
92
|
+
|
|
93
|
+
<h2><a href="index.html">Documentation</a></h2><div class="category"></div><div class="category"><h2>1-Core API</h2><h3>Global</h3><ul><li><a href="global.html#asciiEncoding">asciiEncoding</a></li><li><a href="global.html#base64Encoding">base64Encoding</a></li><li><a href="global.html#csvStringToJson">csvStringToJson</a></li><li><a href="global.html#csvStringToJsonStringified">csvStringToJsonStringified</a></li><li><a href="global.html#csvToJsonAsync">csvToJsonAsync</a></li><li><a href="global.html#customEncoding">customEncoding</a></li><li><a href="global.html#fieldDelimiter">fieldDelimiter</a></li><li><a href="global.html#formatValueByType">formatValueByType</a></li><li><a href="global.html#generateJsonFileFromCsv">generateJsonFileFromCsv</a></li><li><a href="global.html#getJsonFromCsv">getJsonFromCsv</a></li><li><a href="global.html#hexEncoding">hexEncoding</a></li><li><a href="global.html#indexHeader">indexHeader</a></li><li><a href="global.html#latin1Encoding">latin1Encoding</a></li><li><a href="global.html#mapRows">mapRows</a></li><li><a href="global.html#parseSubArray">parseSubArray</a></li><li><a href="global.html#supportQuotedField">supportQuotedField</a></li><li><a href="global.html#trimHeaderFieldWhiteSpace">trimHeaderFieldWhiteSpace</a></li><li><a href="global.html#ucs2Encoding">ucs2Encoding</a></li><li><a href="global.html#utf16leEncoding">utf16leEncoding</a></li><li><a href="global.html#utf8Encoding">utf8Encoding</a></li></ul></div><div class="category"><h2>2-Sync</h2><h3>Classes</h3><ul><li><a href="CsvToJson.html">CsvToJson</a></li></ul></div><div class="category"><h2>3-Async</h2><h3>Classes</h3><ul><li><a href="CsvToJsonAsync.html">CsvToJsonAsync</a></li></ul></div><div class="category"><h2>4-Browser</h2><h3>Classes</h3><ul><li><a href="BrowserApi.html">BrowserApi</a></li></ul></div><div class="category"><h2>Error Classes</h2><h3>Classes</h3><ul><li><a href="BrowserApiError.html">BrowserApiError</a></li><li><a href="ConfigurationError.html">ConfigurationError</a></li><li><a href="CsvFormatError.html">CsvFormatError</a></li><li><a href="CsvParsingError.html">CsvParsingError</a></li><li><a href="FileOperationError.html">FileOperationError</a></li><li><a href="InputValidationError.html">InputValidationError</a></li><li><a href="JsonValidationError.html">JsonValidationError</a></li></ul></div><div class="category"><h2>Utilities</h2><h3>Classes</h3><ul><li><a href="FileUtils.html">FileUtils</a></li><li><a href="JsonUtil.html">JsonUtil</a></li><li><a href="StringUtils.html">StringUtils</a></li></ul></div>
|
|
94
|
+
|
|
95
|
+
</nav>
|
|
96
|
+
</div>
|
|
97
|
+
<div class="core" id="main-content-wrapper">
|
|
98
|
+
<div class="content">
|
|
99
|
+
<header class="page-title">
|
|
100
|
+
<p>Class</p>
|
|
101
|
+
<h1>CsvToJson</h1>
|
|
102
|
+
</header>
|
|
103
|
+
|
|
104
|
+
|
|
24
105
|
|
|
25
106
|
|
|
26
107
|
|
|
@@ -40,18 +121,29 @@ Provides chainable API for configuring and converting CSV data</p></div>
|
|
|
40
121
|
<div class="container-overview">
|
|
41
122
|
|
|
42
123
|
|
|
124
|
+
<div class='vertical-section'>
|
|
125
|
+
<div class="members">
|
|
126
|
+
<div class="member">
|
|
127
|
+
<div class=name>
|
|
128
|
+
<span class="tag">Constructor</span>
|
|
129
|
+
</div>
|
|
130
|
+
|
|
43
131
|
|
|
44
|
-
|
|
45
|
-
<h2>Constructor</h2>
|
|
46
|
-
|
|
47
132
|
|
|
48
133
|
|
|
49
|
-
<h4 class="name" id="CsvToJson"
|
|
134
|
+
<h4 class="name" id="CsvToJson">
|
|
135
|
+
<a class="href-link" href="#CsvToJson">#</a>
|
|
136
|
+
|
|
137
|
+
<span class="code-name">
|
|
138
|
+
|
|
139
|
+
new CsvToJson<span class="signature">()</span><span class="type-signature"></span>
|
|
140
|
+
|
|
141
|
+
</span>
|
|
142
|
+
</h4>
|
|
50
143
|
|
|
51
144
|
|
|
52
145
|
|
|
53
|
-
|
|
54
|
-
|
|
146
|
+
|
|
55
147
|
|
|
56
148
|
|
|
57
149
|
|
|
@@ -90,18 +182,19 @@ Provides chainable API for configuring and converting CSV data</p></div>
|
|
|
90
182
|
|
|
91
183
|
|
|
92
184
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
<dt class="tag-source">Source:</dt>
|
|
96
|
-
<dd class="tag-source"><ul class="dummy"><li>
|
|
97
|
-
<a href="src_csvToJson.js.html">src/csvToJson.js</a>, <a href="src_csvToJson.js.html#line23">line 23</a>
|
|
98
|
-
</li></ul></dd>
|
|
99
185
|
|
|
100
186
|
|
|
101
187
|
|
|
102
188
|
|
|
103
189
|
|
|
104
190
|
|
|
191
|
+
|
|
192
|
+
<p class="tag-source">
|
|
193
|
+
<a href="src_csvToJson.js.html" class="button">View Source</a>
|
|
194
|
+
<span>
|
|
195
|
+
<a href="src_csvToJson.js.html">src/csvToJson.js</a>, <a href="src_csvToJson.js.html#line24">line 24</a>
|
|
196
|
+
</span>
|
|
197
|
+
</p>
|
|
105
198
|
|
|
106
199
|
</dl>
|
|
107
200
|
|
|
@@ -124,9 +217,15 @@ Provides chainable API for configuring and converting CSV data</p></div>
|
|
|
124
217
|
|
|
125
218
|
|
|
126
219
|
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
</div>
|
|
223
|
+
</div>
|
|
224
|
+
</div>
|
|
225
|
+
|
|
127
226
|
|
|
128
227
|
</div>
|
|
129
|
-
|
|
228
|
+
|
|
130
229
|
|
|
131
230
|
|
|
132
231
|
|
|
@@ -142,27 +241,34 @@ Provides chainable API for configuring and converting CSV data</p></div>
|
|
|
142
241
|
|
|
143
242
|
|
|
144
243
|
|
|
145
|
-
<
|
|
244
|
+
<div class='vertical-section'>
|
|
245
|
+
<h1>Methods</h1>
|
|
246
|
+
<div class="members">
|
|
247
|
+
|
|
248
|
+
<div class="member">
|
|
146
249
|
|
|
250
|
+
|
|
251
|
+
|
|
252
|
+
<h4 class="name" id="csvStringToJson">
|
|
253
|
+
<a class="href-link" href="#csvStringToJson">#</a>
|
|
147
254
|
|
|
255
|
+
<span class="code-name">
|
|
148
256
|
|
|
149
|
-
|
|
257
|
+
csvStringToJson<span class="signature">(csvString)</span><span class="type-signature"> → {Array.<object>}</span>
|
|
258
|
+
|
|
259
|
+
</span>
|
|
260
|
+
</h4>
|
|
150
261
|
|
|
151
262
|
|
|
152
263
|
|
|
153
|
-
<h4 class="name" id="csvStringToJson"><span class="type-signature"></span>csvStringToJson<span class="signature">(csvString)</span><span class="type-signature"> → {Array.<object>}</span></h4>
|
|
154
264
|
|
|
155
|
-
|
|
265
|
+
<div class="description">
|
|
266
|
+
<p>Parse CSV string content and return as JSON array of objects</p>
|
|
267
|
+
</div>
|
|
156
268
|
|
|
157
269
|
|
|
158
270
|
|
|
159
271
|
|
|
160
|
-
<div class="description">
|
|
161
|
-
<p>Parse CSV string content and return as JSON array of objects</p>
|
|
162
|
-
</div>
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
272
|
|
|
167
273
|
|
|
168
274
|
|
|
@@ -171,52 +277,54 @@ Provides chainable API for configuring and converting CSV data</p></div>
|
|
|
171
277
|
|
|
172
278
|
<h5>Parameters:</h5>
|
|
173
279
|
|
|
280
|
+
<div class="table-container">
|
|
281
|
+
<table class="params table">
|
|
282
|
+
<thead>
|
|
283
|
+
<tr>
|
|
284
|
+
|
|
285
|
+
<th>Name</th>
|
|
286
|
+
|
|
174
287
|
|
|
175
|
-
<
|
|
176
|
-
<thead>
|
|
177
|
-
<tr>
|
|
178
|
-
|
|
179
|
-
<th>Name</th>
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
<th>Type</th>
|
|
288
|
+
<th>Type</th>
|
|
183
289
|
|
|
184
|
-
|
|
290
|
+
|
|
185
291
|
|
|
186
|
-
|
|
292
|
+
|
|
187
293
|
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
294
|
+
<th class="last">Description</th>
|
|
295
|
+
</tr>
|
|
296
|
+
</thead>
|
|
191
297
|
|
|
192
|
-
|
|
193
|
-
|
|
298
|
+
<tbody>
|
|
299
|
+
|
|
194
300
|
|
|
195
|
-
<tr>
|
|
196
|
-
|
|
197
|
-
<td class="name"><code>csvString</code></td>
|
|
198
301
|
|
|
302
|
+
<tr class="deep-level-0">
|
|
303
|
+
|
|
304
|
+
<td class="name"><code>csvString</code></td>
|
|
305
|
+
|
|
199
306
|
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
<
|
|
307
|
+
<td class="type">
|
|
308
|
+
|
|
309
|
+
|
|
310
|
+
<code class="param-type">string</code>
|
|
204
311
|
|
|
205
312
|
|
|
206
|
-
|
|
207
|
-
|
|
313
|
+
|
|
314
|
+
</td>
|
|
208
315
|
|
|
209
|
-
|
|
316
|
+
|
|
210
317
|
|
|
211
|
-
|
|
318
|
+
|
|
212
319
|
|
|
213
|
-
|
|
214
|
-
|
|
320
|
+
<td class="description last"><p>CSV content as string</p></td>
|
|
321
|
+
</tr>
|
|
215
322
|
|
|
216
|
-
|
|
217
|
-
</tbody>
|
|
218
|
-
</table>
|
|
219
323
|
|
|
324
|
+
|
|
325
|
+
</tbody>
|
|
326
|
+
</table>
|
|
327
|
+
</div>
|
|
220
328
|
|
|
221
329
|
|
|
222
330
|
|
|
@@ -247,18 +355,19 @@ Provides chainable API for configuring and converting CSV data</p></div>
|
|
|
247
355
|
|
|
248
356
|
|
|
249
357
|
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
<dt class="tag-source">Source:</dt>
|
|
253
|
-
<dd class="tag-source"><ul class="dummy"><li>
|
|
254
|
-
<a href="src_csvToJson.js.html">src/csvToJson.js</a>, <a href="src_csvToJson.js.html#line179">line 179</a>
|
|
255
|
-
</li></ul></dd>
|
|
256
358
|
|
|
257
359
|
|
|
258
360
|
|
|
259
361
|
|
|
260
362
|
|
|
261
363
|
|
|
364
|
+
|
|
365
|
+
<p class="tag-source">
|
|
366
|
+
<a href="src_csvToJson.js.html" class="button">View Source</a>
|
|
367
|
+
<span>
|
|
368
|
+
<a href="src_csvToJson.js.html">src/csvToJson.js</a>, <a href="src_csvToJson.js.html#line180">line 180</a>
|
|
369
|
+
</span>
|
|
370
|
+
</p>
|
|
262
371
|
|
|
263
372
|
</dl>
|
|
264
373
|
|
|
@@ -274,90 +383,95 @@ Provides chainable API for configuring and converting CSV data</p></div>
|
|
|
274
383
|
|
|
275
384
|
|
|
276
385
|
|
|
277
|
-
<h5>Throws:</h5>
|
|
278
|
-
|
|
279
|
-
|
|
280
386
|
|
|
281
|
-
<dl>
|
|
282
|
-
<dt>
|
|
283
|
-
<div class="param-desc">
|
|
284
|
-
<p>If CSV is malformed</p>
|
|
285
|
-
</div>
|
|
286
|
-
</dt>
|
|
287
|
-
<dd></dd>
|
|
288
|
-
<dt>
|
|
289
|
-
<dl>
|
|
290
|
-
<dt>
|
|
291
|
-
Type
|
|
292
|
-
</dt>
|
|
293
|
-
<dd>
|
|
294
|
-
|
|
295
|
-
<span class="param-type"><a href="CsvFormatError.html">CsvFormatError</a></span>
|
|
296
387
|
|
|
297
388
|
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
389
|
+
<div class='columns method-parameter'>
|
|
390
|
+
<div class="column is-2"><label>Throws:</label></div>
|
|
391
|
+
<div class="column is-10">
|
|
392
|
+
|
|
393
|
+
|
|
394
|
+
<div class="columns">
|
|
395
|
+
|
|
396
|
+
<div class='param-desc column is-7'><p>If CSV is malformed</p></div>
|
|
397
|
+
<div class='column is-5 has-text-left'>
|
|
398
|
+
<label>Type: </label>
|
|
399
|
+
<code class="param-type"><a href="CsvFormatError.html">CsvFormatError</a></code>
|
|
303
400
|
|
|
304
401
|
|
|
402
|
+
</div>
|
|
305
403
|
|
|
404
|
+
</div>
|
|
306
405
|
|
|
406
|
+
|
|
407
|
+
</div>
|
|
408
|
+
</div>
|
|
307
409
|
|
|
308
|
-
<h5>Returns:</h5>
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
<div class="param-desc">
|
|
312
|
-
<p>Array of objects representing CSV rows</p>
|
|
313
|
-
</div>
|
|
314
410
|
|
|
315
411
|
|
|
412
|
+
<div class='columns method-parameter'>
|
|
413
|
+
<div class="column is-2"><label>Returns:</label></div>
|
|
414
|
+
<div class="column is-10">
|
|
415
|
+
|
|
416
|
+
|
|
316
417
|
|
|
317
|
-
<
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
418
|
+
<div class="columns">
|
|
419
|
+
|
|
420
|
+
<div class='param-desc column is-7'><p>Array of objects representing CSV rows</p></div>
|
|
421
|
+
|
|
422
|
+
|
|
423
|
+
<div class='column is-5 has-text-left'>
|
|
424
|
+
<label>Type: </label>
|
|
322
425
|
|
|
323
|
-
<
|
|
426
|
+
<code class="param-type">Array.<object></code>
|
|
324
427
|
|
|
325
428
|
|
|
326
|
-
</
|
|
327
|
-
</dl>
|
|
328
|
-
|
|
429
|
+
</div>
|
|
329
430
|
|
|
431
|
+
</div>
|
|
432
|
+
|
|
433
|
+
|
|
434
|
+
</div>
|
|
435
|
+
</div>
|
|
330
436
|
|
|
331
437
|
|
|
332
438
|
|
|
333
439
|
|
|
334
440
|
<h5>Example</h5>
|
|
335
441
|
|
|
336
|
-
|
|
442
|
+
|
|
443
|
+
<pre class="prettyprint"><code>const csvToJson = require('convert-csv-to-json');
|
|
337
444
|
const rows = csvToJson.csvStringToJson('name,age\nAlice,30');
|
|
338
445
|
console.log(rows); // [{ name: 'Alice', age: '30' }]</code></pre>
|
|
446
|
+
|
|
339
447
|
|
|
340
448
|
|
|
449
|
+
</div>
|
|
450
|
+
|
|
451
|
+
<div class="member">
|
|
341
452
|
|
|
453
|
+
|
|
454
|
+
|
|
455
|
+
<h4 class="name" id="csvStringToJsonStringified">
|
|
456
|
+
<a class="href-link" href="#csvStringToJsonStringified">#</a>
|
|
342
457
|
|
|
458
|
+
<span class="code-name">
|
|
343
459
|
|
|
344
|
-
|
|
460
|
+
csvStringToJsonStringified<span class="signature">(csvString)</span><span class="type-signature"> → {string}</span>
|
|
461
|
+
|
|
462
|
+
</span>
|
|
463
|
+
</h4>
|
|
345
464
|
|
|
346
465
|
|
|
347
466
|
|
|
348
|
-
<h4 class="name" id="csvStringToJsonStringified"><span class="type-signature"></span>csvStringToJsonStringified<span class="signature">(csvString)</span><span class="type-signature"> → {string}</span></h4>
|
|
349
467
|
|
|
350
|
-
|
|
468
|
+
<div class="description">
|
|
469
|
+
<p>Parse CSV string content and return as stringified JSON</p>
|
|
470
|
+
</div>
|
|
351
471
|
|
|
352
472
|
|
|
353
473
|
|
|
354
474
|
|
|
355
|
-
<div class="description">
|
|
356
|
-
<p>Parse CSV string content and return as stringified JSON</p>
|
|
357
|
-
</div>
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
475
|
|
|
362
476
|
|
|
363
477
|
|
|
@@ -366,52 +480,54 @@ console.log(rows); // [{ name: 'Alice', age: '30' }]</code></pre>
|
|
|
366
480
|
|
|
367
481
|
<h5>Parameters:</h5>
|
|
368
482
|
|
|
483
|
+
<div class="table-container">
|
|
484
|
+
<table class="params table">
|
|
485
|
+
<thead>
|
|
486
|
+
<tr>
|
|
487
|
+
|
|
488
|
+
<th>Name</th>
|
|
489
|
+
|
|
369
490
|
|
|
370
|
-
<
|
|
371
|
-
<thead>
|
|
372
|
-
<tr>
|
|
373
|
-
|
|
374
|
-
<th>Name</th>
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
<th>Type</th>
|
|
491
|
+
<th>Type</th>
|
|
378
492
|
|
|
379
|
-
|
|
493
|
+
|
|
380
494
|
|
|
381
|
-
|
|
495
|
+
|
|
382
496
|
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
497
|
+
<th class="last">Description</th>
|
|
498
|
+
</tr>
|
|
499
|
+
</thead>
|
|
386
500
|
|
|
387
|
-
|
|
388
|
-
|
|
501
|
+
<tbody>
|
|
502
|
+
|
|
389
503
|
|
|
390
|
-
<tr>
|
|
391
|
-
|
|
392
|
-
<td class="name"><code>csvString</code></td>
|
|
393
504
|
|
|
505
|
+
<tr class="deep-level-0">
|
|
506
|
+
|
|
507
|
+
<td class="name"><code>csvString</code></td>
|
|
508
|
+
|
|
394
509
|
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
<
|
|
510
|
+
<td class="type">
|
|
511
|
+
|
|
512
|
+
|
|
513
|
+
<code class="param-type">string</code>
|
|
399
514
|
|
|
400
515
|
|
|
401
|
-
|
|
402
|
-
|
|
516
|
+
|
|
517
|
+
</td>
|
|
403
518
|
|
|
404
|
-
|
|
519
|
+
|
|
405
520
|
|
|
406
|
-
|
|
521
|
+
|
|
407
522
|
|
|
408
|
-
|
|
409
|
-
|
|
523
|
+
<td class="description last"><p>CSV content as string</p></td>
|
|
524
|
+
</tr>
|
|
410
525
|
|
|
411
|
-
|
|
412
|
-
</tbody>
|
|
413
|
-
</table>
|
|
414
526
|
|
|
527
|
+
|
|
528
|
+
</tbody>
|
|
529
|
+
</table>
|
|
530
|
+
</div>
|
|
415
531
|
|
|
416
532
|
|
|
417
533
|
|
|
@@ -442,18 +558,19 @@ console.log(rows); // [{ name: 'Alice', age: '30' }]</code></pre>
|
|
|
442
558
|
|
|
443
559
|
|
|
444
560
|
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
<dt class="tag-source">Source:</dt>
|
|
448
|
-
<dd class="tag-source"><ul class="dummy"><li>
|
|
449
|
-
<a href="src_csvToJson.js.html">src/csvToJson.js</a>, <a href="src_csvToJson.js.html#line194">line 194</a>
|
|
450
|
-
</li></ul></dd>
|
|
451
561
|
|
|
452
562
|
|
|
453
563
|
|
|
454
564
|
|
|
455
565
|
|
|
456
566
|
|
|
567
|
+
|
|
568
|
+
<p class="tag-source">
|
|
569
|
+
<a href="src_csvToJson.js.html" class="button">View Source</a>
|
|
570
|
+
<span>
|
|
571
|
+
<a href="src_csvToJson.js.html">src/csvToJson.js</a>, <a href="src_csvToJson.js.html#line195">line 195</a>
|
|
572
|
+
</span>
|
|
573
|
+
</p>
|
|
457
574
|
|
|
458
575
|
</dl>
|
|
459
576
|
|
|
@@ -469,117 +586,109 @@ console.log(rows); // [{ name: 'Alice', age: '30' }]</code></pre>
|
|
|
469
586
|
|
|
470
587
|
|
|
471
588
|
|
|
472
|
-
<h5>Throws:</h5>
|
|
473
|
-
<ul>
|
|
474
|
-
<li>
|
|
475
|
-
|
|
476
|
-
<dl>
|
|
477
|
-
<dt>
|
|
478
|
-
<div class="param-desc">
|
|
479
|
-
<p>If CSV is malformed</p>
|
|
480
|
-
</div>
|
|
481
|
-
</dt>
|
|
482
|
-
<dd></dd>
|
|
483
|
-
<dt>
|
|
484
|
-
<dl>
|
|
485
|
-
<dt>
|
|
486
|
-
Type
|
|
487
|
-
</dt>
|
|
488
|
-
<dd>
|
|
489
|
-
|
|
490
|
-
<span class="param-type"><a href="CsvFormatError.html">CsvFormatError</a></span>
|
|
491
589
|
|
|
492
590
|
|
|
493
|
-
</dd>
|
|
494
|
-
</dl>
|
|
495
|
-
</dt>
|
|
496
|
-
<dd></dd>
|
|
497
|
-
</dl>
|
|
498
591
|
|
|
499
|
-
|
|
592
|
+
<div class='columns method-parameter'>
|
|
593
|
+
<div class="column is-2"><label>Throws:</label></div>
|
|
594
|
+
<div class="column is-10">
|
|
595
|
+
|
|
596
|
+
|
|
597
|
+
<div class="columns">
|
|
500
598
|
|
|
501
|
-
|
|
599
|
+
<div class='param-desc column is-7'><p>If CSV is malformed</p></div>
|
|
600
|
+
<div class='column is-5 has-text-left'>
|
|
601
|
+
<label>Type: </label>
|
|
602
|
+
<code class="param-type"><a href="CsvFormatError.html">CsvFormatError</a></code>
|
|
502
603
|
|
|
503
|
-
<dl>
|
|
504
|
-
<dt>
|
|
505
|
-
<div class="param-desc">
|
|
506
|
-
<p>If JSON generation fails</p>
|
|
507
|
-
</div>
|
|
508
|
-
</dt>
|
|
509
|
-
<dd></dd>
|
|
510
|
-
<dt>
|
|
511
|
-
<dl>
|
|
512
|
-
<dt>
|
|
513
|
-
Type
|
|
514
|
-
</dt>
|
|
515
|
-
<dd>
|
|
516
|
-
|
|
517
|
-
<span class="param-type"><a href="JsonValidationError.html">JsonValidationError</a></span>
|
|
518
604
|
|
|
605
|
+
</div>
|
|
606
|
+
|
|
607
|
+
</div>
|
|
519
608
|
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
</
|
|
609
|
+
|
|
610
|
+
|
|
611
|
+
<div class="columns">
|
|
612
|
+
|
|
613
|
+
<div class='param-desc column is-7'><p>If JSON generation fails</p></div>
|
|
614
|
+
<div class='column is-5 has-text-left'>
|
|
615
|
+
<label>Type: </label>
|
|
616
|
+
<code class="param-type"><a href="JsonValidationError.html">JsonValidationError</a></code>
|
|
525
617
|
|
|
526
|
-
</li>
|
|
527
|
-
</ul>
|
|
528
618
|
|
|
619
|
+
</div>
|
|
620
|
+
|
|
621
|
+
</div>
|
|
529
622
|
|
|
530
|
-
|
|
623
|
+
|
|
624
|
+
</div>
|
|
625
|
+
</div>
|
|
531
626
|
|
|
532
|
-
|
|
533
|
-
<div class="param-desc">
|
|
534
|
-
<p>JSON stringified array of objects</p>
|
|
535
|
-
</div>
|
|
536
627
|
|
|
537
628
|
|
|
629
|
+
<div class='columns method-parameter'>
|
|
630
|
+
<div class="column is-2"><label>Returns:</label></div>
|
|
631
|
+
<div class="column is-10">
|
|
632
|
+
|
|
633
|
+
|
|
538
634
|
|
|
539
|
-
<
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
635
|
+
<div class="columns">
|
|
636
|
+
|
|
637
|
+
<div class='param-desc column is-7'><p>JSON stringified array of objects</p></div>
|
|
638
|
+
|
|
639
|
+
|
|
640
|
+
<div class='column is-5 has-text-left'>
|
|
641
|
+
<label>Type: </label>
|
|
544
642
|
|
|
545
|
-
<
|
|
546
|
-
|
|
643
|
+
<code class="param-type">string</code>
|
|
547
644
|
|
|
548
|
-
</dd>
|
|
549
|
-
</dl>
|
|
550
645
|
|
|
646
|
+
</div>
|
|
551
647
|
|
|
648
|
+
</div>
|
|
649
|
+
|
|
650
|
+
|
|
651
|
+
</div>
|
|
652
|
+
</div>
|
|
552
653
|
|
|
553
654
|
|
|
554
655
|
|
|
555
656
|
|
|
556
657
|
<h5>Example</h5>
|
|
557
658
|
|
|
558
|
-
|
|
659
|
+
|
|
660
|
+
<pre class="prettyprint"><code>const csvToJson = require('convert-csv-to-json');
|
|
559
661
|
const jsonString = csvToJson.csvStringToJsonStringified('name,age\nAlice,30');
|
|
560
662
|
console.log(jsonString);</code></pre>
|
|
663
|
+
|
|
664
|
+
|
|
561
665
|
|
|
666
|
+
</div>
|
|
667
|
+
|
|
668
|
+
<div class="member">
|
|
562
669
|
|
|
563
670
|
|
|
671
|
+
|
|
672
|
+
<h4 class="name" id="encoding">
|
|
673
|
+
<a class="href-link" href="#encoding">#</a>
|
|
564
674
|
|
|
675
|
+
<span class="code-name">
|
|
565
676
|
|
|
566
|
-
|
|
677
|
+
encoding<span class="signature">(encoding)</span><span class="type-signature"> → {this}</span>
|
|
678
|
+
|
|
679
|
+
</span>
|
|
680
|
+
</h4>
|
|
567
681
|
|
|
568
682
|
|
|
569
683
|
|
|
570
|
-
<h4 class="name" id="encoding"><span class="type-signature"></span>encoding<span class="signature">(encoding)</span><span class="type-signature"> → {this}</span></h4>
|
|
571
684
|
|
|
572
|
-
|
|
685
|
+
<div class="description">
|
|
686
|
+
<p>Set file encoding for reading CSV files</p>
|
|
687
|
+
</div>
|
|
573
688
|
|
|
574
689
|
|
|
575
690
|
|
|
576
691
|
|
|
577
|
-
<div class="description">
|
|
578
|
-
<p>Set file encoding for reading CSV files</p>
|
|
579
|
-
</div>
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
692
|
|
|
584
693
|
|
|
585
694
|
|
|
@@ -588,52 +697,54 @@ console.log(jsonString);</code></pre>
|
|
|
588
697
|
|
|
589
698
|
<h5>Parameters:</h5>
|
|
590
699
|
|
|
700
|
+
<div class="table-container">
|
|
701
|
+
<table class="params table">
|
|
702
|
+
<thead>
|
|
703
|
+
<tr>
|
|
704
|
+
|
|
705
|
+
<th>Name</th>
|
|
706
|
+
|
|
591
707
|
|
|
592
|
-
<
|
|
593
|
-
<thead>
|
|
594
|
-
<tr>
|
|
595
|
-
|
|
596
|
-
<th>Name</th>
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
<th>Type</th>
|
|
708
|
+
<th>Type</th>
|
|
600
709
|
|
|
601
|
-
|
|
710
|
+
|
|
602
711
|
|
|
603
|
-
|
|
712
|
+
|
|
604
713
|
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
714
|
+
<th class="last">Description</th>
|
|
715
|
+
</tr>
|
|
716
|
+
</thead>
|
|
608
717
|
|
|
609
|
-
|
|
610
|
-
|
|
718
|
+
<tbody>
|
|
719
|
+
|
|
611
720
|
|
|
612
|
-
<tr>
|
|
613
|
-
|
|
614
|
-
<td class="name"><code>encoding</code></td>
|
|
615
721
|
|
|
722
|
+
<tr class="deep-level-0">
|
|
723
|
+
|
|
724
|
+
<td class="name"><code>encoding</code></td>
|
|
725
|
+
|
|
616
726
|
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
<
|
|
727
|
+
<td class="type">
|
|
728
|
+
|
|
729
|
+
|
|
730
|
+
<code class="param-type">string</code>
|
|
621
731
|
|
|
622
732
|
|
|
623
|
-
|
|
624
|
-
|
|
733
|
+
|
|
734
|
+
</td>
|
|
625
735
|
|
|
626
|
-
|
|
736
|
+
|
|
627
737
|
|
|
628
|
-
|
|
738
|
+
|
|
629
739
|
|
|
630
|
-
|
|
631
|
-
|
|
740
|
+
<td class="description last"><p>Node.js supported encoding (e.g., 'utf8', 'latin1', 'ascii')</p></td>
|
|
741
|
+
</tr>
|
|
632
742
|
|
|
633
|
-
|
|
634
|
-
</tbody>
|
|
635
|
-
</table>
|
|
636
743
|
|
|
744
|
+
|
|
745
|
+
</tbody>
|
|
746
|
+
</table>
|
|
747
|
+
</div>
|
|
637
748
|
|
|
638
749
|
|
|
639
750
|
|
|
@@ -664,18 +775,19 @@ console.log(jsonString);</code></pre>
|
|
|
664
775
|
|
|
665
776
|
|
|
666
777
|
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
<dt class="tag-source">Source:</dt>
|
|
670
|
-
<dd class="tag-source"><ul class="dummy"><li>
|
|
671
|
-
<a href="src_csvToJson.js.html">src/csvToJson.js</a>, <a href="src_csvToJson.js.html#line104">line 104</a>
|
|
672
|
-
</li></ul></dd>
|
|
673
778
|
|
|
674
779
|
|
|
675
780
|
|
|
676
781
|
|
|
677
782
|
|
|
678
783
|
|
|
784
|
+
|
|
785
|
+
<p class="tag-source">
|
|
786
|
+
<a href="src_csvToJson.js.html" class="button">View Source</a>
|
|
787
|
+
<span>
|
|
788
|
+
<a href="src_csvToJson.js.html">src/csvToJson.js</a>, <a href="src_csvToJson.js.html#line105">line 105</a>
|
|
789
|
+
</span>
|
|
790
|
+
</p>
|
|
679
791
|
|
|
680
792
|
</dl>
|
|
681
793
|
|
|
@@ -693,106 +805,119 @@ console.log(jsonString);</code></pre>
|
|
|
693
805
|
|
|
694
806
|
|
|
695
807
|
|
|
696
|
-
<h5>Returns:</h5>
|
|
697
808
|
|
|
698
|
-
|
|
699
|
-
<div class="param-desc">
|
|
700
|
-
<p>For method chaining</p>
|
|
701
|
-
</div>
|
|
702
809
|
|
|
703
810
|
|
|
811
|
+
<div class='columns method-parameter'>
|
|
812
|
+
<div class="column is-2"><label>Returns:</label></div>
|
|
813
|
+
<div class="column is-10">
|
|
814
|
+
|
|
815
|
+
|
|
704
816
|
|
|
705
|
-
<
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
817
|
+
<div class="columns">
|
|
818
|
+
|
|
819
|
+
<div class='param-desc column is-7'><p>For method chaining</p></div>
|
|
820
|
+
|
|
821
|
+
|
|
822
|
+
<div class='column is-5 has-text-left'>
|
|
823
|
+
<label>Type: </label>
|
|
710
824
|
|
|
711
|
-
<
|
|
825
|
+
<code class="param-type">this</code>
|
|
712
826
|
|
|
713
827
|
|
|
714
|
-
</
|
|
715
|
-
</dl>
|
|
716
|
-
|
|
828
|
+
</div>
|
|
717
829
|
|
|
830
|
+
</div>
|
|
718
831
|
|
|
832
|
+
|
|
833
|
+
</div>
|
|
834
|
+
</div>
|
|
719
835
|
|
|
720
836
|
|
|
721
837
|
|
|
722
838
|
|
|
723
|
-
|
|
839
|
+
</div>
|
|
724
840
|
|
|
841
|
+
<div class="member">
|
|
725
842
|
|
|
726
|
-
|
|
727
843
|
|
|
728
844
|
|
|
729
|
-
<h4 class="name" id="fieldDelimiter"
|
|
845
|
+
<h4 class="name" id="fieldDelimiter">
|
|
846
|
+
<a class="href-link" href="#fieldDelimiter">#</a>
|
|
847
|
+
|
|
848
|
+
<span class="code-name">
|
|
849
|
+
|
|
850
|
+
fieldDelimiter<span class="signature">(delimiter)</span><span class="type-signature"> → {this}</span>
|
|
851
|
+
|
|
852
|
+
</span>
|
|
853
|
+
</h4>
|
|
730
854
|
|
|
731
855
|
|
|
732
856
|
|
|
857
|
+
|
|
858
|
+
<div class="description">
|
|
859
|
+
<p>Set the field delimiter character</p>
|
|
860
|
+
</div>
|
|
861
|
+
|
|
862
|
+
|
|
733
863
|
|
|
734
864
|
|
|
735
865
|
|
|
736
|
-
<div class="description">
|
|
737
|
-
<p>Set the field delimiter character</p>
|
|
738
|
-
</div>
|
|
739
866
|
|
|
740
867
|
|
|
741
868
|
|
|
742
869
|
|
|
743
870
|
|
|
871
|
+
<h5>Parameters:</h5>
|
|
872
|
+
|
|
873
|
+
<div class="table-container">
|
|
874
|
+
<table class="params table">
|
|
875
|
+
<thead>
|
|
876
|
+
<tr>
|
|
877
|
+
|
|
878
|
+
<th>Name</th>
|
|
879
|
+
|
|
744
880
|
|
|
881
|
+
<th>Type</th>
|
|
745
882
|
|
|
883
|
+
|
|
746
884
|
|
|
885
|
+
|
|
747
886
|
|
|
748
|
-
|
|
749
|
-
|
|
887
|
+
<th class="last">Description</th>
|
|
888
|
+
</tr>
|
|
889
|
+
</thead>
|
|
750
890
|
|
|
751
|
-
<
|
|
752
|
-
<thead>
|
|
753
|
-
<tr>
|
|
754
|
-
|
|
755
|
-
<th>Name</th>
|
|
891
|
+
<tbody>
|
|
756
892
|
|
|
757
893
|
|
|
758
|
-
|
|
894
|
+
|
|
895
|
+
<tr class="deep-level-0">
|
|
896
|
+
|
|
897
|
+
<td class="name"><code>delimiter</code></td>
|
|
898
|
+
|
|
759
899
|
|
|
760
|
-
|
|
900
|
+
<td class="type">
|
|
901
|
+
|
|
902
|
+
|
|
903
|
+
<code class="param-type">string</code>
|
|
761
904
|
|
|
762
|
-
|
|
763
905
|
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
</thead>
|
|
906
|
+
|
|
907
|
+
</td>
|
|
767
908
|
|
|
768
|
-
|
|
769
|
-
|
|
909
|
+
|
|
770
910
|
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
<td class="name"><code>delimiter</code></td>
|
|
774
|
-
|
|
911
|
+
|
|
775
912
|
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
<span class="param-type">string</span>
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
</td>
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
913
|
+
<td class="description last"><p>Character(s) to use as field separator (default: ',')</p></td>
|
|
914
|
+
</tr>
|
|
788
915
|
|
|
789
|
-
<td class="description last"><p>Character(s) to use as field separator (default: ',')</p></td>
|
|
790
|
-
</tr>
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
</tbody>
|
|
794
|
-
</table>
|
|
795
916
|
|
|
917
|
+
|
|
918
|
+
</tbody>
|
|
919
|
+
</table>
|
|
920
|
+
</div>
|
|
796
921
|
|
|
797
922
|
|
|
798
923
|
|
|
@@ -823,18 +948,19 @@ console.log(jsonString);</code></pre>
|
|
|
823
948
|
|
|
824
949
|
|
|
825
950
|
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
<dt class="tag-source">Source:</dt>
|
|
829
|
-
<dd class="tag-source"><ul class="dummy"><li>
|
|
830
|
-
<a href="src_csvToJson.js.html">src/csvToJson.js</a>, <a href="src_csvToJson.js.html#line52">line 52</a>
|
|
831
|
-
</li></ul></dd>
|
|
832
951
|
|
|
833
952
|
|
|
834
953
|
|
|
835
954
|
|
|
836
955
|
|
|
837
956
|
|
|
957
|
+
|
|
958
|
+
<p class="tag-source">
|
|
959
|
+
<a href="src_csvToJson.js.html" class="button">View Source</a>
|
|
960
|
+
<span>
|
|
961
|
+
<a href="src_csvToJson.js.html">src/csvToJson.js</a>, <a href="src_csvToJson.js.html#line53">line 53</a>
|
|
962
|
+
</span>
|
|
963
|
+
</p>
|
|
838
964
|
|
|
839
965
|
</dl>
|
|
840
966
|
|
|
@@ -852,50 +978,61 @@ console.log(jsonString);</code></pre>
|
|
|
852
978
|
|
|
853
979
|
|
|
854
980
|
|
|
855
|
-
<h5>Returns:</h5>
|
|
856
981
|
|
|
857
|
-
|
|
858
|
-
<div class="param-desc">
|
|
859
|
-
<p>For method chaining</p>
|
|
860
|
-
</div>
|
|
861
982
|
|
|
862
983
|
|
|
984
|
+
<div class='columns method-parameter'>
|
|
985
|
+
<div class="column is-2"><label>Returns:</label></div>
|
|
986
|
+
<div class="column is-10">
|
|
987
|
+
|
|
988
|
+
|
|
863
989
|
|
|
864
|
-
<
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
990
|
+
<div class="columns">
|
|
991
|
+
|
|
992
|
+
<div class='param-desc column is-7'><p>For method chaining</p></div>
|
|
993
|
+
|
|
994
|
+
|
|
995
|
+
<div class='column is-5 has-text-left'>
|
|
996
|
+
<label>Type: </label>
|
|
869
997
|
|
|
870
|
-
<
|
|
998
|
+
<code class="param-type">this</code>
|
|
871
999
|
|
|
872
1000
|
|
|
873
|
-
</
|
|
874
|
-
</dl>
|
|
875
|
-
|
|
1001
|
+
</div>
|
|
876
1002
|
|
|
1003
|
+
</div>
|
|
877
1004
|
|
|
1005
|
+
|
|
1006
|
+
</div>
|
|
1007
|
+
</div>
|
|
878
1008
|
|
|
879
1009
|
|
|
880
1010
|
|
|
881
1011
|
|
|
882
|
-
|
|
1012
|
+
</div>
|
|
883
1013
|
|
|
1014
|
+
<div class="member">
|
|
884
1015
|
|
|
885
|
-
|
|
886
1016
|
|
|
887
1017
|
|
|
888
|
-
<h4 class="name" id="formatValueByType"
|
|
1018
|
+
<h4 class="name" id="formatValueByType">
|
|
1019
|
+
<a class="href-link" href="#formatValueByType">#</a>
|
|
1020
|
+
|
|
1021
|
+
<span class="code-name">
|
|
1022
|
+
|
|
1023
|
+
formatValueByType<span class="signature">(active)</span><span class="type-signature"> → {this}</span>
|
|
1024
|
+
|
|
1025
|
+
</span>
|
|
1026
|
+
</h4>
|
|
889
1027
|
|
|
890
1028
|
|
|
891
1029
|
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
<div class="description">
|
|
896
|
-
<p>Enable or disable automatic type formatting for values
|
|
1030
|
+
|
|
1031
|
+
<div class="description">
|
|
1032
|
+
<p>Enable or disable automatic type formatting for values
|
|
897
1033
|
When enabled, numeric strings are converted to numbers, 'true'/'false' to booleans</p>
|
|
898
|
-
</div>
|
|
1034
|
+
</div>
|
|
1035
|
+
|
|
899
1036
|
|
|
900
1037
|
|
|
901
1038
|
|
|
@@ -907,52 +1044,54 @@ When enabled, numeric strings are converted to numbers, 'true'/'false' to boolea
|
|
|
907
1044
|
|
|
908
1045
|
<h5>Parameters:</h5>
|
|
909
1046
|
|
|
1047
|
+
<div class="table-container">
|
|
1048
|
+
<table class="params table">
|
|
1049
|
+
<thead>
|
|
1050
|
+
<tr>
|
|
1051
|
+
|
|
1052
|
+
<th>Name</th>
|
|
1053
|
+
|
|
910
1054
|
|
|
911
|
-
<
|
|
912
|
-
<thead>
|
|
913
|
-
<tr>
|
|
914
|
-
|
|
915
|
-
<th>Name</th>
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
<th>Type</th>
|
|
1055
|
+
<th>Type</th>
|
|
919
1056
|
|
|
920
|
-
|
|
1057
|
+
|
|
921
1058
|
|
|
922
|
-
|
|
1059
|
+
|
|
923
1060
|
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
1061
|
+
<th class="last">Description</th>
|
|
1062
|
+
</tr>
|
|
1063
|
+
</thead>
|
|
927
1064
|
|
|
928
|
-
|
|
929
|
-
|
|
1065
|
+
<tbody>
|
|
1066
|
+
|
|
930
1067
|
|
|
931
|
-
<tr>
|
|
932
|
-
|
|
933
|
-
<td class="name"><code>active</code></td>
|
|
934
1068
|
|
|
1069
|
+
<tr class="deep-level-0">
|
|
1070
|
+
|
|
1071
|
+
<td class="name"><code>active</code></td>
|
|
1072
|
+
|
|
935
1073
|
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
<
|
|
1074
|
+
<td class="type">
|
|
1075
|
+
|
|
1076
|
+
|
|
1077
|
+
<code class="param-type">boolean</code>
|
|
940
1078
|
|
|
941
1079
|
|
|
942
|
-
|
|
943
|
-
|
|
1080
|
+
|
|
1081
|
+
</td>
|
|
944
1082
|
|
|
945
|
-
|
|
1083
|
+
|
|
946
1084
|
|
|
947
|
-
|
|
1085
|
+
|
|
948
1086
|
|
|
949
|
-
|
|
950
|
-
|
|
1087
|
+
<td class="description last"><p>Whether to format values by type</p></td>
|
|
1088
|
+
</tr>
|
|
951
1089
|
|
|
952
|
-
|
|
953
|
-
</tbody>
|
|
954
|
-
</table>
|
|
955
1090
|
|
|
1091
|
+
|
|
1092
|
+
</tbody>
|
|
1093
|
+
</table>
|
|
1094
|
+
</div>
|
|
956
1095
|
|
|
957
1096
|
|
|
958
1097
|
|
|
@@ -983,18 +1122,19 @@ When enabled, numeric strings are converted to numbers, 'true'/'false' to boolea
|
|
|
983
1122
|
|
|
984
1123
|
|
|
985
1124
|
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
<dt class="tag-source">Source:</dt>
|
|
989
|
-
<dd class="tag-source"><ul class="dummy"><li>
|
|
990
|
-
<a href="src_csvToJson.js.html">src/csvToJson.js</a>, <a href="src_csvToJson.js.html#line31">line 31</a>
|
|
991
|
-
</li></ul></dd>
|
|
992
1125
|
|
|
993
1126
|
|
|
994
1127
|
|
|
995
1128
|
|
|
996
1129
|
|
|
997
1130
|
|
|
1131
|
+
|
|
1132
|
+
<p class="tag-source">
|
|
1133
|
+
<a href="src_csvToJson.js.html" class="button">View Source</a>
|
|
1134
|
+
<span>
|
|
1135
|
+
<a href="src_csvToJson.js.html">src/csvToJson.js</a>, <a href="src_csvToJson.js.html#line32">line 32</a>
|
|
1136
|
+
</span>
|
|
1137
|
+
</p>
|
|
998
1138
|
|
|
999
1139
|
</dl>
|
|
1000
1140
|
|
|
@@ -1012,49 +1152,60 @@ When enabled, numeric strings are converted to numbers, 'true'/'false' to boolea
|
|
|
1012
1152
|
|
|
1013
1153
|
|
|
1014
1154
|
|
|
1015
|
-
<h5>Returns:</h5>
|
|
1016
1155
|
|
|
1017
|
-
|
|
1018
|
-
<div class="param-desc">
|
|
1019
|
-
<p>For method chaining</p>
|
|
1020
|
-
</div>
|
|
1021
1156
|
|
|
1022
1157
|
|
|
1158
|
+
<div class='columns method-parameter'>
|
|
1159
|
+
<div class="column is-2"><label>Returns:</label></div>
|
|
1160
|
+
<div class="column is-10">
|
|
1161
|
+
|
|
1162
|
+
|
|
1023
1163
|
|
|
1024
|
-
<
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1164
|
+
<div class="columns">
|
|
1165
|
+
|
|
1166
|
+
<div class='param-desc column is-7'><p>For method chaining</p></div>
|
|
1167
|
+
|
|
1168
|
+
|
|
1169
|
+
<div class='column is-5 has-text-left'>
|
|
1170
|
+
<label>Type: </label>
|
|
1029
1171
|
|
|
1030
|
-
<
|
|
1172
|
+
<code class="param-type">this</code>
|
|
1031
1173
|
|
|
1032
1174
|
|
|
1033
|
-
</
|
|
1034
|
-
</dl>
|
|
1035
|
-
|
|
1175
|
+
</div>
|
|
1036
1176
|
|
|
1177
|
+
</div>
|
|
1037
1178
|
|
|
1179
|
+
|
|
1180
|
+
</div>
|
|
1181
|
+
</div>
|
|
1038
1182
|
|
|
1039
1183
|
|
|
1040
1184
|
|
|
1041
1185
|
|
|
1042
|
-
|
|
1186
|
+
</div>
|
|
1043
1187
|
|
|
1188
|
+
<div class="member">
|
|
1044
1189
|
|
|
1045
|
-
|
|
1046
1190
|
|
|
1047
1191
|
|
|
1048
|
-
<h4 class="name" id="generateJsonFileFromCsv"
|
|
1192
|
+
<h4 class="name" id="generateJsonFileFromCsv">
|
|
1193
|
+
<a class="href-link" href="#generateJsonFileFromCsv">#</a>
|
|
1194
|
+
|
|
1195
|
+
<span class="code-name">
|
|
1196
|
+
|
|
1197
|
+
generateJsonFileFromCsv<span class="signature">(fileInputName, fileOutputName)</span><span class="type-signature"></span>
|
|
1198
|
+
|
|
1199
|
+
</span>
|
|
1200
|
+
</h4>
|
|
1049
1201
|
|
|
1050
1202
|
|
|
1051
1203
|
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
</div>
|
|
1204
|
+
|
|
1205
|
+
<div class="description">
|
|
1206
|
+
<p>Read a CSV file and write the parsed JSON to an output file</p>
|
|
1207
|
+
</div>
|
|
1208
|
+
|
|
1058
1209
|
|
|
1059
1210
|
|
|
1060
1211
|
|
|
@@ -1066,83 +1217,85 @@ When enabled, numeric strings are converted to numbers, 'true'/'false' to boolea
|
|
|
1066
1217
|
|
|
1067
1218
|
<h5>Parameters:</h5>
|
|
1068
1219
|
|
|
1220
|
+
<div class="table-container">
|
|
1221
|
+
<table class="params table">
|
|
1222
|
+
<thead>
|
|
1223
|
+
<tr>
|
|
1224
|
+
|
|
1225
|
+
<th>Name</th>
|
|
1226
|
+
|
|
1069
1227
|
|
|
1070
|
-
<
|
|
1071
|
-
<thead>
|
|
1072
|
-
<tr>
|
|
1073
|
-
|
|
1074
|
-
<th>Name</th>
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
<th>Type</th>
|
|
1228
|
+
<th>Type</th>
|
|
1078
1229
|
|
|
1079
|
-
|
|
1230
|
+
|
|
1080
1231
|
|
|
1081
|
-
|
|
1232
|
+
|
|
1082
1233
|
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1234
|
+
<th class="last">Description</th>
|
|
1235
|
+
</tr>
|
|
1236
|
+
</thead>
|
|
1086
1237
|
|
|
1087
|
-
|
|
1088
|
-
|
|
1238
|
+
<tbody>
|
|
1239
|
+
|
|
1089
1240
|
|
|
1090
|
-
<tr>
|
|
1091
|
-
|
|
1092
|
-
<td class="name"><code>fileInputName</code></td>
|
|
1093
1241
|
|
|
1242
|
+
<tr class="deep-level-0">
|
|
1243
|
+
|
|
1244
|
+
<td class="name"><code>fileInputName</code></td>
|
|
1245
|
+
|
|
1094
1246
|
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
<
|
|
1247
|
+
<td class="type">
|
|
1248
|
+
|
|
1249
|
+
|
|
1250
|
+
<code class="param-type">string</code>
|
|
1099
1251
|
|
|
1100
1252
|
|
|
1101
|
-
|
|
1102
|
-
|
|
1253
|
+
|
|
1254
|
+
</td>
|
|
1103
1255
|
|
|
1104
|
-
|
|
1256
|
+
|
|
1105
1257
|
|
|
1106
|
-
|
|
1258
|
+
|
|
1107
1259
|
|
|
1108
|
-
|
|
1109
|
-
|
|
1260
|
+
<td class="description last"><p>Path to input CSV file</p></td>
|
|
1261
|
+
</tr>
|
|
1110
1262
|
|
|
1111
|
-
|
|
1112
1263
|
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
<td class="name"><code>fileOutputName</code></td>
|
|
1116
|
-
|
|
1264
|
+
|
|
1117
1265
|
|
|
1118
|
-
<td class="type">
|
|
1119
1266
|
|
|
1120
|
-
|
|
1121
|
-
|
|
1267
|
+
<tr class="deep-level-0">
|
|
1268
|
+
|
|
1269
|
+
<td class="name"><code>fileOutputName</code></td>
|
|
1270
|
+
|
|
1122
1271
|
|
|
1272
|
+
<td class="type">
|
|
1273
|
+
|
|
1274
|
+
|
|
1275
|
+
<code class="param-type">string</code>
|
|
1123
1276
|
|
|
1124
|
-
|
|
1125
|
-
</td>
|
|
1126
1277
|
|
|
1127
|
-
|
|
1278
|
+
|
|
1279
|
+
</td>
|
|
1128
1280
|
|
|
1129
|
-
|
|
1281
|
+
|
|
1130
1282
|
|
|
1131
|
-
|
|
1132
|
-
</tr>
|
|
1283
|
+
|
|
1133
1284
|
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
</table>
|
|
1285
|
+
<td class="description last"><p>Path to output JSON file</p></td>
|
|
1286
|
+
</tr>
|
|
1137
1287
|
|
|
1138
1288
|
|
|
1289
|
+
|
|
1290
|
+
</tbody>
|
|
1291
|
+
</table>
|
|
1292
|
+
</div>
|
|
1139
1293
|
|
|
1140
1294
|
|
|
1141
1295
|
|
|
1142
1296
|
|
|
1143
|
-
<dl class="details">
|
|
1144
1297
|
|
|
1145
|
-
|
|
1298
|
+
<dl class="details">
|
|
1146
1299
|
|
|
1147
1300
|
|
|
1148
1301
|
|
|
@@ -1167,16 +1320,19 @@ When enabled, numeric strings are converted to numbers, 'true'/'false' to boolea
|
|
|
1167
1320
|
|
|
1168
1321
|
|
|
1169
1322
|
|
|
1170
|
-
<dt class="tag-source">Source:</dt>
|
|
1171
|
-
<dd class="tag-source"><ul class="dummy"><li>
|
|
1172
|
-
<a href="src_csvToJson.js.html">src/csvToJson.js</a>, <a href="src_csvToJson.js.html#line129">line 129</a>
|
|
1173
|
-
</li></ul></dd>
|
|
1174
1323
|
|
|
1175
1324
|
|
|
1176
1325
|
|
|
1177
1326
|
|
|
1178
1327
|
|
|
1179
1328
|
|
|
1329
|
+
|
|
1330
|
+
<p class="tag-source">
|
|
1331
|
+
<a href="src_csvToJson.js.html" class="button">View Source</a>
|
|
1332
|
+
<span>
|
|
1333
|
+
<a href="src_csvToJson.js.html">src/csvToJson.js</a>, <a href="src_csvToJson.js.html#line130">line 130</a>
|
|
1334
|
+
</span>
|
|
1335
|
+
</p>
|
|
1180
1336
|
|
|
1181
1337
|
</dl>
|
|
1182
1338
|
|
|
@@ -1192,88 +1348,75 @@ When enabled, numeric strings are converted to numbers, 'true'/'false' to boolea
|
|
|
1192
1348
|
|
|
1193
1349
|
|
|
1194
1350
|
|
|
1195
|
-
<h5>Throws:</h5>
|
|
1196
|
-
<ul>
|
|
1197
|
-
<li>
|
|
1198
1351
|
|
|
1199
|
-
<dl>
|
|
1200
|
-
<dt>
|
|
1201
|
-
<div class="param-desc">
|
|
1202
|
-
<p>If file read or write fails</p>
|
|
1203
|
-
</div>
|
|
1204
|
-
</dt>
|
|
1205
|
-
<dd></dd>
|
|
1206
|
-
<dt>
|
|
1207
|
-
<dl>
|
|
1208
|
-
<dt>
|
|
1209
|
-
Type
|
|
1210
|
-
</dt>
|
|
1211
|
-
<dd>
|
|
1212
|
-
|
|
1213
|
-
<span class="param-type"><a href="FileOperationError.html">FileOperationError</a></span>
|
|
1214
1352
|
|
|
1215
1353
|
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1354
|
+
<div class='columns method-parameter'>
|
|
1355
|
+
<div class="column is-2"><label>Throws:</label></div>
|
|
1356
|
+
<div class="column is-10">
|
|
1357
|
+
|
|
1358
|
+
|
|
1359
|
+
<div class="columns">
|
|
1360
|
+
|
|
1361
|
+
<div class='param-desc column is-7'><p>If file read or write fails</p></div>
|
|
1362
|
+
<div class='column is-5 has-text-left'>
|
|
1363
|
+
<label>Type: </label>
|
|
1364
|
+
<code class="param-type"><a href="FileOperationError.html">FileOperationError</a></code>
|
|
1365
|
+
|
|
1221
1366
|
|
|
1222
|
-
</
|
|
1367
|
+
</div>
|
|
1223
1368
|
|
|
1224
|
-
|
|
1369
|
+
</div>
|
|
1225
1370
|
|
|
1226
|
-
<dl>
|
|
1227
|
-
<dt>
|
|
1228
|
-
<div class="param-desc">
|
|
1229
|
-
<p>If CSV is malformed</p>
|
|
1230
|
-
</div>
|
|
1231
|
-
</dt>
|
|
1232
|
-
<dd></dd>
|
|
1233
|
-
<dt>
|
|
1234
|
-
<dl>
|
|
1235
|
-
<dt>
|
|
1236
|
-
Type
|
|
1237
|
-
</dt>
|
|
1238
|
-
<dd>
|
|
1239
1371
|
|
|
1240
|
-
|
|
1372
|
+
|
|
1373
|
+
<div class="columns">
|
|
1374
|
+
|
|
1375
|
+
<div class='param-desc column is-7'><p>If CSV is malformed</p></div>
|
|
1376
|
+
<div class='column is-5 has-text-left'>
|
|
1377
|
+
<label>Type: </label>
|
|
1378
|
+
<code class="param-type"><a href="CsvFormatError.html">CsvFormatError</a></code>
|
|
1241
1379
|
|
|
1242
1380
|
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1381
|
+
</div>
|
|
1382
|
+
|
|
1383
|
+
</div>
|
|
1384
|
+
|
|
1385
|
+
|
|
1386
|
+
</div>
|
|
1387
|
+
</div>
|
|
1248
1388
|
|
|
1249
|
-
</li>
|
|
1250
|
-
</ul>
|
|
1251
1389
|
|
|
1252
1390
|
|
|
1253
1391
|
|
|
1254
1392
|
|
|
1255
1393
|
|
|
1394
|
+
</div>
|
|
1395
|
+
|
|
1396
|
+
<div class="member">
|
|
1256
1397
|
|
|
1257
1398
|
|
|
1399
|
+
|
|
1400
|
+
<h4 class="name" id="getJsonFromCsv">
|
|
1401
|
+
<a class="href-link" href="#getJsonFromCsv">#</a>
|
|
1258
1402
|
|
|
1403
|
+
<span class="code-name">
|
|
1259
1404
|
|
|
1260
|
-
|
|
1405
|
+
getJsonFromCsv<span class="signature">(fileInputName)</span><span class="type-signature"> → {Array.<object>}</span>
|
|
1406
|
+
|
|
1407
|
+
</span>
|
|
1408
|
+
</h4>
|
|
1261
1409
|
|
|
1262
1410
|
|
|
1263
1411
|
|
|
1264
|
-
<h4 class="name" id="getJsonFromCsv"><span class="type-signature"></span>getJsonFromCsv<span class="signature">(fileInputName)</span><span class="type-signature"> → {Array.<object>}</span></h4>
|
|
1265
1412
|
|
|
1266
|
-
|
|
1413
|
+
<div class="description">
|
|
1414
|
+
<p>Read a CSV file and return parsed data as JSON array of objects</p>
|
|
1415
|
+
</div>
|
|
1267
1416
|
|
|
1268
1417
|
|
|
1269
1418
|
|
|
1270
1419
|
|
|
1271
|
-
<div class="description">
|
|
1272
|
-
<p>Read a CSV file and return parsed data as JSON array of objects</p>
|
|
1273
|
-
</div>
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
1420
|
|
|
1278
1421
|
|
|
1279
1422
|
|
|
@@ -1282,52 +1425,54 @@ When enabled, numeric strings are converted to numbers, 'true'/'false' to boolea
|
|
|
1282
1425
|
|
|
1283
1426
|
<h5>Parameters:</h5>
|
|
1284
1427
|
|
|
1428
|
+
<div class="table-container">
|
|
1429
|
+
<table class="params table">
|
|
1430
|
+
<thead>
|
|
1431
|
+
<tr>
|
|
1432
|
+
|
|
1433
|
+
<th>Name</th>
|
|
1434
|
+
|
|
1285
1435
|
|
|
1286
|
-
<
|
|
1287
|
-
<thead>
|
|
1288
|
-
<tr>
|
|
1289
|
-
|
|
1290
|
-
<th>Name</th>
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
<th>Type</th>
|
|
1436
|
+
<th>Type</th>
|
|
1294
1437
|
|
|
1295
|
-
|
|
1438
|
+
|
|
1296
1439
|
|
|
1297
|
-
|
|
1440
|
+
|
|
1298
1441
|
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1442
|
+
<th class="last">Description</th>
|
|
1443
|
+
</tr>
|
|
1444
|
+
</thead>
|
|
1302
1445
|
|
|
1303
|
-
|
|
1304
|
-
|
|
1446
|
+
<tbody>
|
|
1447
|
+
|
|
1305
1448
|
|
|
1306
|
-
<tr>
|
|
1307
|
-
|
|
1308
|
-
<td class="name"><code>fileInputName</code></td>
|
|
1309
1449
|
|
|
1450
|
+
<tr class="deep-level-0">
|
|
1451
|
+
|
|
1452
|
+
<td class="name"><code>fileInputName</code></td>
|
|
1453
|
+
|
|
1310
1454
|
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
<
|
|
1455
|
+
<td class="type">
|
|
1456
|
+
|
|
1457
|
+
|
|
1458
|
+
<code class="param-type">string</code>
|
|
1315
1459
|
|
|
1316
1460
|
|
|
1317
|
-
|
|
1318
|
-
|
|
1461
|
+
|
|
1462
|
+
</td>
|
|
1319
1463
|
|
|
1320
|
-
|
|
1464
|
+
|
|
1321
1465
|
|
|
1322
|
-
|
|
1466
|
+
|
|
1323
1467
|
|
|
1324
|
-
|
|
1325
|
-
|
|
1468
|
+
<td class="description last"><p>Path to input CSV file</p></td>
|
|
1469
|
+
</tr>
|
|
1326
1470
|
|
|
1327
|
-
|
|
1328
|
-
</tbody>
|
|
1329
|
-
</table>
|
|
1330
1471
|
|
|
1472
|
+
|
|
1473
|
+
</tbody>
|
|
1474
|
+
</table>
|
|
1475
|
+
</div>
|
|
1331
1476
|
|
|
1332
1477
|
|
|
1333
1478
|
|
|
@@ -1358,18 +1503,19 @@ When enabled, numeric strings are converted to numbers, 'true'/'false' to boolea
|
|
|
1358
1503
|
|
|
1359
1504
|
|
|
1360
1505
|
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
<dt class="tag-source">Source:</dt>
|
|
1364
|
-
<dd class="tag-source"><ul class="dummy"><li>
|
|
1365
|
-
<a href="src_csvToJson.js.html">src/csvToJson.js</a>, <a href="src_csvToJson.js.html#line164">line 164</a>
|
|
1366
|
-
</li></ul></dd>
|
|
1367
1506
|
|
|
1368
1507
|
|
|
1369
1508
|
|
|
1370
1509
|
|
|
1371
1510
|
|
|
1372
1511
|
|
|
1512
|
+
|
|
1513
|
+
<p class="tag-source">
|
|
1514
|
+
<a href="src_csvToJson.js.html" class="button">View Source</a>
|
|
1515
|
+
<span>
|
|
1516
|
+
<a href="src_csvToJson.js.html">src/csvToJson.js</a>, <a href="src_csvToJson.js.html#line165">line 165</a>
|
|
1517
|
+
</span>
|
|
1518
|
+
</p>
|
|
1373
1519
|
|
|
1374
1520
|
</dl>
|
|
1375
1521
|
|
|
@@ -1385,117 +1531,109 @@ When enabled, numeric strings are converted to numbers, 'true'/'false' to boolea
|
|
|
1385
1531
|
|
|
1386
1532
|
|
|
1387
1533
|
|
|
1388
|
-
<h5>Throws:</h5>
|
|
1389
|
-
<ul>
|
|
1390
|
-
<li>
|
|
1391
1534
|
|
|
1392
|
-
<dl>
|
|
1393
|
-
<dt>
|
|
1394
|
-
<div class="param-desc">
|
|
1395
|
-
<p>If file read fails</p>
|
|
1396
|
-
</div>
|
|
1397
|
-
</dt>
|
|
1398
|
-
<dd></dd>
|
|
1399
|
-
<dt>
|
|
1400
|
-
<dl>
|
|
1401
|
-
<dt>
|
|
1402
|
-
Type
|
|
1403
|
-
</dt>
|
|
1404
|
-
<dd>
|
|
1405
|
-
|
|
1406
|
-
<span class="param-type"><a href="FileOperationError.html">FileOperationError</a></span>
|
|
1407
1535
|
|
|
1408
1536
|
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
</li>
|
|
1537
|
+
<div class='columns method-parameter'>
|
|
1538
|
+
<div class="column is-2"><label>Throws:</label></div>
|
|
1539
|
+
<div class="column is-10">
|
|
1540
|
+
|
|
1541
|
+
|
|
1542
|
+
<div class="columns">
|
|
1416
1543
|
|
|
1417
|
-
|
|
1544
|
+
<div class='param-desc column is-7'><p>If file read fails</p></div>
|
|
1545
|
+
<div class='column is-5 has-text-left'>
|
|
1546
|
+
<label>Type: </label>
|
|
1547
|
+
<code class="param-type"><a href="FileOperationError.html">FileOperationError</a></code>
|
|
1418
1548
|
|
|
1419
|
-
<dl>
|
|
1420
|
-
<dt>
|
|
1421
|
-
<div class="param-desc">
|
|
1422
|
-
<p>If CSV is malformed</p>
|
|
1423
|
-
</div>
|
|
1424
|
-
</dt>
|
|
1425
|
-
<dd></dd>
|
|
1426
|
-
<dt>
|
|
1427
|
-
<dl>
|
|
1428
|
-
<dt>
|
|
1429
|
-
Type
|
|
1430
|
-
</dt>
|
|
1431
|
-
<dd>
|
|
1432
|
-
|
|
1433
|
-
<span class="param-type"><a href="CsvFormatError.html">CsvFormatError</a></span>
|
|
1434
1549
|
|
|
1550
|
+
</div>
|
|
1551
|
+
|
|
1552
|
+
</div>
|
|
1435
1553
|
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
</
|
|
1554
|
+
|
|
1555
|
+
|
|
1556
|
+
<div class="columns">
|
|
1557
|
+
|
|
1558
|
+
<div class='param-desc column is-7'><p>If CSV is malformed</p></div>
|
|
1559
|
+
<div class='column is-5 has-text-left'>
|
|
1560
|
+
<label>Type: </label>
|
|
1561
|
+
<code class="param-type"><a href="CsvFormatError.html">CsvFormatError</a></code>
|
|
1441
1562
|
|
|
1442
|
-
</li>
|
|
1443
|
-
</ul>
|
|
1444
1563
|
|
|
1564
|
+
</div>
|
|
1565
|
+
|
|
1566
|
+
</div>
|
|
1445
1567
|
|
|
1446
|
-
|
|
1568
|
+
|
|
1569
|
+
</div>
|
|
1570
|
+
</div>
|
|
1447
1571
|
|
|
1448
|
-
|
|
1449
|
-
<div class="param-desc">
|
|
1450
|
-
<p>Array of objects representing CSV rows</p>
|
|
1451
|
-
</div>
|
|
1452
1572
|
|
|
1453
1573
|
|
|
1574
|
+
<div class='columns method-parameter'>
|
|
1575
|
+
<div class="column is-2"><label>Returns:</label></div>
|
|
1576
|
+
<div class="column is-10">
|
|
1577
|
+
|
|
1578
|
+
|
|
1454
1579
|
|
|
1455
|
-
<
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1580
|
+
<div class="columns">
|
|
1581
|
+
|
|
1582
|
+
<div class='param-desc column is-7'><p>Array of objects representing CSV rows</p></div>
|
|
1583
|
+
|
|
1584
|
+
|
|
1585
|
+
<div class='column is-5 has-text-left'>
|
|
1586
|
+
<label>Type: </label>
|
|
1460
1587
|
|
|
1461
|
-
<
|
|
1462
|
-
|
|
1588
|
+
<code class="param-type">Array.<object></code>
|
|
1463
1589
|
|
|
1464
|
-
</dd>
|
|
1465
|
-
</dl>
|
|
1466
1590
|
|
|
1591
|
+
</div>
|
|
1467
1592
|
|
|
1593
|
+
</div>
|
|
1594
|
+
|
|
1595
|
+
|
|
1596
|
+
</div>
|
|
1597
|
+
</div>
|
|
1468
1598
|
|
|
1469
1599
|
|
|
1470
1600
|
|
|
1471
1601
|
|
|
1472
1602
|
<h5>Example</h5>
|
|
1473
1603
|
|
|
1474
|
-
|
|
1604
|
+
|
|
1605
|
+
<pre class="prettyprint"><code>const csvToJson = require('convert-csv-to-json');
|
|
1475
1606
|
const rows = csvToJson.getJsonFromCsv('resource/input.csv');
|
|
1476
1607
|
console.log(rows);</code></pre>
|
|
1608
|
+
|
|
1477
1609
|
|
|
1478
1610
|
|
|
1611
|
+
</div>
|
|
1612
|
+
|
|
1613
|
+
<div class="member">
|
|
1479
1614
|
|
|
1615
|
+
|
|
1616
|
+
|
|
1617
|
+
<h4 class="name" id="getJsonFromCsvStringified">
|
|
1618
|
+
<a class="href-link" href="#getJsonFromCsvStringified">#</a>
|
|
1480
1619
|
|
|
1620
|
+
<span class="code-name">
|
|
1481
1621
|
|
|
1482
|
-
|
|
1622
|
+
getJsonFromCsvStringified<span class="signature">(fileInputName)</span><span class="type-signature"> → {string}</span>
|
|
1623
|
+
|
|
1624
|
+
</span>
|
|
1625
|
+
</h4>
|
|
1483
1626
|
|
|
1484
1627
|
|
|
1485
1628
|
|
|
1486
|
-
<h4 class="name" id="getJsonFromCsvStringified"><span class="type-signature"></span>getJsonFromCsvStringified<span class="signature">(fileInputName)</span><span class="type-signature"> → {string}</span></h4>
|
|
1487
1629
|
|
|
1488
|
-
|
|
1630
|
+
<div class="description">
|
|
1631
|
+
<p>Read a CSV file and return parsed data as stringified JSON</p>
|
|
1632
|
+
</div>
|
|
1489
1633
|
|
|
1490
1634
|
|
|
1491
1635
|
|
|
1492
1636
|
|
|
1493
|
-
<div class="description">
|
|
1494
|
-
<p>Read a CSV file and return parsed data as stringified JSON</p>
|
|
1495
|
-
</div>
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
1637
|
|
|
1500
1638
|
|
|
1501
1639
|
|
|
@@ -1504,52 +1642,54 @@ console.log(rows);</code></pre>
|
|
|
1504
1642
|
|
|
1505
1643
|
<h5>Parameters:</h5>
|
|
1506
1644
|
|
|
1645
|
+
<div class="table-container">
|
|
1646
|
+
<table class="params table">
|
|
1647
|
+
<thead>
|
|
1648
|
+
<tr>
|
|
1649
|
+
|
|
1650
|
+
<th>Name</th>
|
|
1651
|
+
|
|
1507
1652
|
|
|
1508
|
-
<
|
|
1509
|
-
<thead>
|
|
1510
|
-
<tr>
|
|
1511
|
-
|
|
1512
|
-
<th>Name</th>
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
<th>Type</th>
|
|
1653
|
+
<th>Type</th>
|
|
1516
1654
|
|
|
1517
|
-
|
|
1655
|
+
|
|
1518
1656
|
|
|
1519
|
-
|
|
1657
|
+
|
|
1520
1658
|
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1659
|
+
<th class="last">Description</th>
|
|
1660
|
+
</tr>
|
|
1661
|
+
</thead>
|
|
1524
1662
|
|
|
1525
|
-
|
|
1526
|
-
|
|
1663
|
+
<tbody>
|
|
1664
|
+
|
|
1527
1665
|
|
|
1528
|
-
<tr>
|
|
1529
|
-
|
|
1530
|
-
<td class="name"><code>fileInputName</code></td>
|
|
1531
1666
|
|
|
1667
|
+
<tr class="deep-level-0">
|
|
1668
|
+
|
|
1669
|
+
<td class="name"><code>fileInputName</code></td>
|
|
1670
|
+
|
|
1532
1671
|
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
<
|
|
1672
|
+
<td class="type">
|
|
1673
|
+
|
|
1674
|
+
|
|
1675
|
+
<code class="param-type">string</code>
|
|
1537
1676
|
|
|
1538
1677
|
|
|
1539
|
-
|
|
1540
|
-
|
|
1678
|
+
|
|
1679
|
+
</td>
|
|
1541
1680
|
|
|
1542
|
-
|
|
1681
|
+
|
|
1543
1682
|
|
|
1544
|
-
|
|
1683
|
+
|
|
1545
1684
|
|
|
1546
|
-
|
|
1547
|
-
|
|
1685
|
+
<td class="description last"><p>Path to input CSV file</p></td>
|
|
1686
|
+
</tr>
|
|
1548
1687
|
|
|
1549
|
-
|
|
1550
|
-
</tbody>
|
|
1551
|
-
</table>
|
|
1552
1688
|
|
|
1689
|
+
|
|
1690
|
+
</tbody>
|
|
1691
|
+
</table>
|
|
1692
|
+
</div>
|
|
1553
1693
|
|
|
1554
1694
|
|
|
1555
1695
|
|
|
@@ -1580,18 +1720,19 @@ console.log(rows);</code></pre>
|
|
|
1580
1720
|
|
|
1581
1721
|
|
|
1582
1722
|
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
<dt class="tag-source">Source:</dt>
|
|
1586
|
-
<dd class="tag-source"><ul class="dummy"><li>
|
|
1587
|
-
<a href="src_csvToJson.js.html">src/csvToJson.js</a>, <a href="src_csvToJson.js.html#line146">line 146</a>
|
|
1588
|
-
</li></ul></dd>
|
|
1589
1723
|
|
|
1590
1724
|
|
|
1591
1725
|
|
|
1592
1726
|
|
|
1593
1727
|
|
|
1594
1728
|
|
|
1729
|
+
|
|
1730
|
+
<p class="tag-source">
|
|
1731
|
+
<a href="src_csvToJson.js.html" class="button">View Source</a>
|
|
1732
|
+
<span>
|
|
1733
|
+
<a href="src_csvToJson.js.html">src/csvToJson.js</a>, <a href="src_csvToJson.js.html#line147">line 147</a>
|
|
1734
|
+
</span>
|
|
1735
|
+
</p>
|
|
1595
1736
|
|
|
1596
1737
|
</dl>
|
|
1597
1738
|
|
|
@@ -1607,144 +1748,123 @@ console.log(rows);</code></pre>
|
|
|
1607
1748
|
|
|
1608
1749
|
|
|
1609
1750
|
|
|
1610
|
-
<h5>Throws:</h5>
|
|
1611
|
-
<ul>
|
|
1612
|
-
<li>
|
|
1613
1751
|
|
|
1614
|
-
<dl>
|
|
1615
|
-
<dt>
|
|
1616
|
-
<div class="param-desc">
|
|
1617
|
-
<p>If file read fails</p>
|
|
1618
|
-
</div>
|
|
1619
|
-
</dt>
|
|
1620
|
-
<dd></dd>
|
|
1621
|
-
<dt>
|
|
1622
|
-
<dl>
|
|
1623
|
-
<dt>
|
|
1624
|
-
Type
|
|
1625
|
-
</dt>
|
|
1626
|
-
<dd>
|
|
1627
|
-
|
|
1628
|
-
<span class="param-type"><a href="FileOperationError.html">FileOperationError</a></span>
|
|
1629
1752
|
|
|
1630
1753
|
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1754
|
+
<div class='columns method-parameter'>
|
|
1755
|
+
<div class="column is-2"><label>Throws:</label></div>
|
|
1756
|
+
<div class="column is-10">
|
|
1757
|
+
|
|
1758
|
+
|
|
1759
|
+
<div class="columns">
|
|
1760
|
+
|
|
1761
|
+
<div class='param-desc column is-7'><p>If file read fails</p></div>
|
|
1762
|
+
<div class='column is-5 has-text-left'>
|
|
1763
|
+
<label>Type: </label>
|
|
1764
|
+
<code class="param-type"><a href="FileOperationError.html">FileOperationError</a></code>
|
|
1765
|
+
|
|
1636
1766
|
|
|
1637
|
-
</
|
|
1767
|
+
</div>
|
|
1638
1768
|
|
|
1639
|
-
|
|
1769
|
+
</div>
|
|
1640
1770
|
|
|
1641
|
-
<dl>
|
|
1642
|
-
<dt>
|
|
1643
|
-
<div class="param-desc">
|
|
1644
|
-
<p>If CSV is malformed</p>
|
|
1645
|
-
</div>
|
|
1646
|
-
</dt>
|
|
1647
|
-
<dd></dd>
|
|
1648
|
-
<dt>
|
|
1649
|
-
<dl>
|
|
1650
|
-
<dt>
|
|
1651
|
-
Type
|
|
1652
|
-
</dt>
|
|
1653
|
-
<dd>
|
|
1654
1771
|
|
|
1655
|
-
|
|
1656
|
-
|
|
1772
|
+
|
|
1773
|
+
<div class="columns">
|
|
1774
|
+
|
|
1775
|
+
<div class='param-desc column is-7'><p>If CSV is malformed</p></div>
|
|
1776
|
+
<div class='column is-5 has-text-left'>
|
|
1777
|
+
<label>Type: </label>
|
|
1778
|
+
<code class="param-type"><a href="CsvFormatError.html">CsvFormatError</a></code>
|
|
1657
1779
|
|
|
1658
|
-
</dd>
|
|
1659
|
-
</dl>
|
|
1660
|
-
</dt>
|
|
1661
|
-
<dd></dd>
|
|
1662
|
-
</dl>
|
|
1663
1780
|
|
|
1664
|
-
</
|
|
1781
|
+
</div>
|
|
1665
1782
|
|
|
1666
|
-
|
|
1783
|
+
</div>
|
|
1667
1784
|
|
|
1668
|
-
<dl>
|
|
1669
|
-
<dt>
|
|
1670
|
-
<div class="param-desc">
|
|
1671
|
-
<p>If JSON generation fails</p>
|
|
1672
|
-
</div>
|
|
1673
|
-
</dt>
|
|
1674
|
-
<dd></dd>
|
|
1675
|
-
<dt>
|
|
1676
|
-
<dl>
|
|
1677
|
-
<dt>
|
|
1678
|
-
Type
|
|
1679
|
-
</dt>
|
|
1680
|
-
<dd>
|
|
1681
1785
|
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
</dl>
|
|
1786
|
+
|
|
1787
|
+
<div class="columns">
|
|
1788
|
+
|
|
1789
|
+
<div class='param-desc column is-7'><p>If JSON generation fails</p></div>
|
|
1790
|
+
<div class='column is-5 has-text-left'>
|
|
1791
|
+
<label>Type: </label>
|
|
1792
|
+
<code class="param-type"><a href="JsonValidationError.html">JsonValidationError</a></code>
|
|
1690
1793
|
|
|
1691
|
-
</li>
|
|
1692
|
-
</ul>
|
|
1693
1794
|
|
|
1795
|
+
</div>
|
|
1796
|
+
|
|
1797
|
+
</div>
|
|
1694
1798
|
|
|
1695
|
-
|
|
1799
|
+
|
|
1800
|
+
</div>
|
|
1801
|
+
</div>
|
|
1696
1802
|
|
|
1697
|
-
|
|
1698
|
-
<div class="param-desc">
|
|
1699
|
-
<p>JSON stringified array of objects</p>
|
|
1700
|
-
</div>
|
|
1701
1803
|
|
|
1702
1804
|
|
|
1805
|
+
<div class='columns method-parameter'>
|
|
1806
|
+
<div class="column is-2"><label>Returns:</label></div>
|
|
1807
|
+
<div class="column is-10">
|
|
1808
|
+
|
|
1809
|
+
|
|
1703
1810
|
|
|
1704
|
-
<
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1811
|
+
<div class="columns">
|
|
1812
|
+
|
|
1813
|
+
<div class='param-desc column is-7'><p>JSON stringified array of objects</p></div>
|
|
1814
|
+
|
|
1815
|
+
|
|
1816
|
+
<div class='column is-5 has-text-left'>
|
|
1817
|
+
<label>Type: </label>
|
|
1709
1818
|
|
|
1710
|
-
<
|
|
1711
|
-
|
|
1819
|
+
<code class="param-type">string</code>
|
|
1712
1820
|
|
|
1713
|
-
</dd>
|
|
1714
|
-
</dl>
|
|
1715
1821
|
|
|
1822
|
+
</div>
|
|
1716
1823
|
|
|
1824
|
+
</div>
|
|
1825
|
+
|
|
1826
|
+
|
|
1827
|
+
</div>
|
|
1828
|
+
</div>
|
|
1717
1829
|
|
|
1718
1830
|
|
|
1719
1831
|
|
|
1720
1832
|
|
|
1721
1833
|
<h5>Example</h5>
|
|
1722
1834
|
|
|
1723
|
-
|
|
1835
|
+
|
|
1836
|
+
<pre class="prettyprint"><code>const csvToJson = require('convert-csv-to-json');
|
|
1724
1837
|
const jsonString = csvToJson.getJsonFromCsvStringified('resource/input.csv');
|
|
1725
1838
|
console.log(jsonString);</code></pre>
|
|
1839
|
+
|
|
1840
|
+
|
|
1726
1841
|
|
|
1842
|
+
</div>
|
|
1843
|
+
|
|
1844
|
+
<div class="member">
|
|
1727
1845
|
|
|
1728
1846
|
|
|
1847
|
+
|
|
1848
|
+
<h4 class="name" id="getLineEndingLength">
|
|
1849
|
+
<a class="href-link" href="#getLineEndingLength">#</a>
|
|
1729
1850
|
|
|
1851
|
+
<span class="code-name">
|
|
1730
1852
|
|
|
1731
|
-
|
|
1853
|
+
getLineEndingLength<span class="signature">(content, index)</span><span class="type-signature"> → {number}</span>
|
|
1854
|
+
|
|
1855
|
+
</span>
|
|
1856
|
+
</h4>
|
|
1732
1857
|
|
|
1733
1858
|
|
|
1734
1859
|
|
|
1735
|
-
<h4 class="name" id="getLineEndingLength"><span class="type-signature"></span>getLineEndingLength<span class="signature">(content, index)</span><span class="type-signature"> → {number}</span></h4>
|
|
1736
1860
|
|
|
1737
|
-
|
|
1861
|
+
<div class="description">
|
|
1862
|
+
<p>Get the length of line ending at current position (CRLF=2, LF=1, CR=1, or 0)</p>
|
|
1863
|
+
</div>
|
|
1738
1864
|
|
|
1739
1865
|
|
|
1740
1866
|
|
|
1741
1867
|
|
|
1742
|
-
<div class="description">
|
|
1743
|
-
<p>Get the length of line ending at current position (CRLF=2, LF=1, CR=1, or 0)</p>
|
|
1744
|
-
</div>
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
1868
|
|
|
1749
1869
|
|
|
1750
1870
|
|
|
@@ -1753,75 +1873,79 @@ console.log(jsonString);</code></pre>
|
|
|
1753
1873
|
|
|
1754
1874
|
<h5>Parameters:</h5>
|
|
1755
1875
|
|
|
1876
|
+
<div class="table-container">
|
|
1877
|
+
<table class="params table">
|
|
1878
|
+
<thead>
|
|
1879
|
+
<tr>
|
|
1880
|
+
|
|
1881
|
+
<th>Name</th>
|
|
1882
|
+
|
|
1756
1883
|
|
|
1757
|
-
<
|
|
1758
|
-
<thead>
|
|
1759
|
-
<tr>
|
|
1760
|
-
|
|
1761
|
-
<th>Name</th>
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
<th>Type</th>
|
|
1884
|
+
<th>Type</th>
|
|
1765
1885
|
|
|
1766
|
-
|
|
1886
|
+
|
|
1767
1887
|
|
|
1768
|
-
|
|
1888
|
+
|
|
1769
1889
|
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1890
|
+
<th class="last">Description</th>
|
|
1891
|
+
</tr>
|
|
1892
|
+
</thead>
|
|
1773
1893
|
|
|
1774
|
-
|
|
1775
|
-
|
|
1894
|
+
<tbody>
|
|
1895
|
+
|
|
1776
1896
|
|
|
1777
|
-
<tr>
|
|
1778
|
-
|
|
1779
|
-
<td class="name"><code>content</code></td>
|
|
1780
1897
|
|
|
1898
|
+
<tr class="deep-level-0">
|
|
1899
|
+
|
|
1900
|
+
<td class="name"><code>content</code></td>
|
|
1901
|
+
|
|
1781
1902
|
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
<
|
|
1903
|
+
<td class="type">
|
|
1904
|
+
|
|
1905
|
+
|
|
1906
|
+
<code class="param-type">string</code>
|
|
1786
1907
|
|
|
1787
1908
|
|
|
1788
|
-
|
|
1789
|
-
|
|
1909
|
+
|
|
1910
|
+
</td>
|
|
1790
1911
|
|
|
1791
|
-
|
|
1912
|
+
|
|
1792
1913
|
|
|
1793
|
-
|
|
1914
|
+
|
|
1794
1915
|
|
|
1795
|
-
|
|
1796
|
-
|
|
1916
|
+
<td class="description last"><p>CSV content</p></td>
|
|
1917
|
+
</tr>
|
|
1797
1918
|
|
|
1798
|
-
|
|
1799
1919
|
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
<td class="name"><code>index</code></td>
|
|
1803
|
-
|
|
1920
|
+
|
|
1804
1921
|
|
|
1805
|
-
<td class="type">
|
|
1806
1922
|
|
|
1807
|
-
|
|
1808
|
-
|
|
1923
|
+
<tr class="deep-level-0">
|
|
1924
|
+
|
|
1925
|
+
<td class="name"><code>index</code></td>
|
|
1926
|
+
|
|
1809
1927
|
|
|
1928
|
+
<td class="type">
|
|
1929
|
+
|
|
1930
|
+
|
|
1931
|
+
<code class="param-type">number</code>
|
|
1810
1932
|
|
|
1811
|
-
|
|
1812
|
-
</td>
|
|
1813
1933
|
|
|
1814
|
-
|
|
1934
|
+
|
|
1935
|
+
</td>
|
|
1815
1936
|
|
|
1816
|
-
|
|
1937
|
+
|
|
1817
1938
|
|
|
1818
|
-
|
|
1819
|
-
|
|
1939
|
+
|
|
1940
|
+
|
|
1941
|
+
<td class="description last"><p>Current index to check</p></td>
|
|
1942
|
+
</tr>
|
|
1820
1943
|
|
|
1821
|
-
|
|
1822
|
-
</tbody>
|
|
1823
|
-
</table>
|
|
1824
1944
|
|
|
1945
|
+
|
|
1946
|
+
</tbody>
|
|
1947
|
+
</table>
|
|
1948
|
+
</div>
|
|
1825
1949
|
|
|
1826
1950
|
|
|
1827
1951
|
|
|
@@ -1852,18 +1976,19 @@ console.log(jsonString);</code></pre>
|
|
|
1852
1976
|
|
|
1853
1977
|
|
|
1854
1978
|
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
<dt class="tag-source">Source:</dt>
|
|
1858
|
-
<dd class="tag-source"><ul class="dummy"><li>
|
|
1859
|
-
<a href="src_csvToJson.js.html">src/csvToJson.js</a>, <a href="src_csvToJson.js.html#line329">line 329</a>
|
|
1860
|
-
</li></ul></dd>
|
|
1861
1979
|
|
|
1862
1980
|
|
|
1863
1981
|
|
|
1864
1982
|
|
|
1865
1983
|
|
|
1866
1984
|
|
|
1985
|
+
|
|
1986
|
+
<p class="tag-source">
|
|
1987
|
+
<a href="src_csvToJson.js.html" class="button">View Source</a>
|
|
1988
|
+
<span>
|
|
1989
|
+
<a href="src_csvToJson.js.html">src/csvToJson.js</a>, <a href="src_csvToJson.js.html#line330">line 330</a>
|
|
1990
|
+
</span>
|
|
1991
|
+
</p>
|
|
1867
1992
|
|
|
1868
1993
|
</dl>
|
|
1869
1994
|
|
|
@@ -1881,49 +2006,60 @@ console.log(jsonString);</code></pre>
|
|
|
1881
2006
|
|
|
1882
2007
|
|
|
1883
2008
|
|
|
1884
|
-
<h5>Returns:</h5>
|
|
1885
2009
|
|
|
1886
|
-
|
|
1887
|
-
<div class="param-desc">
|
|
1888
|
-
<p>Length of line ending (0 if none)</p>
|
|
1889
|
-
</div>
|
|
1890
2010
|
|
|
1891
2011
|
|
|
2012
|
+
<div class='columns method-parameter'>
|
|
2013
|
+
<div class="column is-2"><label>Returns:</label></div>
|
|
2014
|
+
<div class="column is-10">
|
|
2015
|
+
|
|
2016
|
+
|
|
1892
2017
|
|
|
1893
|
-
<
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
2018
|
+
<div class="columns">
|
|
2019
|
+
|
|
2020
|
+
<div class='param-desc column is-7'><p>Length of line ending (0 if none)</p></div>
|
|
2021
|
+
|
|
2022
|
+
|
|
2023
|
+
<div class='column is-5 has-text-left'>
|
|
2024
|
+
<label>Type: </label>
|
|
1898
2025
|
|
|
1899
|
-
<
|
|
1900
|
-
|
|
2026
|
+
<code class="param-type">number</code>
|
|
1901
2027
|
|
|
1902
|
-
</dd>
|
|
1903
|
-
</dl>
|
|
1904
2028
|
|
|
2029
|
+
</div>
|
|
1905
2030
|
|
|
2031
|
+
</div>
|
|
1906
2032
|
|
|
2033
|
+
|
|
2034
|
+
</div>
|
|
2035
|
+
</div>
|
|
1907
2036
|
|
|
1908
2037
|
|
|
1909
2038
|
|
|
1910
2039
|
|
|
1911
|
-
|
|
2040
|
+
</div>
|
|
1912
2041
|
|
|
2042
|
+
<div class="member">
|
|
1913
2043
|
|
|
1914
|
-
|
|
1915
2044
|
|
|
1916
2045
|
|
|
1917
|
-
<h4 class="name" id="indexHeader"
|
|
2046
|
+
<h4 class="name" id="indexHeader">
|
|
2047
|
+
<a class="href-link" href="#indexHeader">#</a>
|
|
2048
|
+
|
|
2049
|
+
<span class="code-name">
|
|
2050
|
+
|
|
2051
|
+
indexHeader<span class="signature">(indexHeaderValue)</span><span class="type-signature"> → {this}</span>
|
|
2052
|
+
|
|
2053
|
+
</span>
|
|
2054
|
+
</h4>
|
|
1918
2055
|
|
|
1919
2056
|
|
|
1920
2057
|
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
</div>
|
|
2058
|
+
|
|
2059
|
+
<div class="description">
|
|
2060
|
+
<p>Set the row index where CSV headers are located</p>
|
|
2061
|
+
</div>
|
|
2062
|
+
|
|
1927
2063
|
|
|
1928
2064
|
|
|
1929
2065
|
|
|
@@ -1935,52 +2071,54 @@ console.log(jsonString);</code></pre>
|
|
|
1935
2071
|
|
|
1936
2072
|
<h5>Parameters:</h5>
|
|
1937
2073
|
|
|
2074
|
+
<div class="table-container">
|
|
2075
|
+
<table class="params table">
|
|
2076
|
+
<thead>
|
|
2077
|
+
<tr>
|
|
2078
|
+
|
|
2079
|
+
<th>Name</th>
|
|
2080
|
+
|
|
1938
2081
|
|
|
1939
|
-
<
|
|
1940
|
-
<thead>
|
|
1941
|
-
<tr>
|
|
1942
|
-
|
|
1943
|
-
<th>Name</th>
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
<th>Type</th>
|
|
2082
|
+
<th>Type</th>
|
|
1947
2083
|
|
|
1948
|
-
|
|
2084
|
+
|
|
1949
2085
|
|
|
1950
|
-
|
|
2086
|
+
|
|
1951
2087
|
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
2088
|
+
<th class="last">Description</th>
|
|
2089
|
+
</tr>
|
|
2090
|
+
</thead>
|
|
1955
2091
|
|
|
1956
|
-
|
|
1957
|
-
|
|
2092
|
+
<tbody>
|
|
2093
|
+
|
|
1958
2094
|
|
|
1959
|
-
<tr>
|
|
1960
|
-
|
|
1961
|
-
<td class="name"><code>indexHeaderValue</code></td>
|
|
1962
2095
|
|
|
2096
|
+
<tr class="deep-level-0">
|
|
2097
|
+
|
|
2098
|
+
<td class="name"><code>indexHeaderValue</code></td>
|
|
2099
|
+
|
|
1963
2100
|
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
<
|
|
2101
|
+
<td class="type">
|
|
2102
|
+
|
|
2103
|
+
|
|
2104
|
+
<code class="param-type">number</code>
|
|
1968
2105
|
|
|
1969
2106
|
|
|
1970
|
-
|
|
1971
|
-
|
|
2107
|
+
|
|
2108
|
+
</td>
|
|
1972
2109
|
|
|
1973
|
-
|
|
2110
|
+
|
|
1974
2111
|
|
|
1975
|
-
|
|
2112
|
+
|
|
1976
2113
|
|
|
1977
|
-
|
|
1978
|
-
|
|
2114
|
+
<td class="description last"><p>Zero-based row index containing headers</p></td>
|
|
2115
|
+
</tr>
|
|
1979
2116
|
|
|
1980
|
-
|
|
1981
|
-
</tbody>
|
|
1982
|
-
</table>
|
|
1983
2117
|
|
|
2118
|
+
|
|
2119
|
+
</tbody>
|
|
2120
|
+
</table>
|
|
2121
|
+
</div>
|
|
1984
2122
|
|
|
1985
2123
|
|
|
1986
2124
|
|
|
@@ -2011,18 +2149,19 @@ console.log(jsonString);</code></pre>
|
|
|
2011
2149
|
|
|
2012
2150
|
|
|
2013
2151
|
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
<dt class="tag-source">Source:</dt>
|
|
2017
|
-
<dd class="tag-source"><ul class="dummy"><li>
|
|
2018
|
-
<a href="src_csvToJson.js.html">src/csvToJson.js</a>, <a href="src_csvToJson.js.html#line73">line 73</a>
|
|
2019
|
-
</li></ul></dd>
|
|
2020
2152
|
|
|
2021
2153
|
|
|
2022
2154
|
|
|
2023
2155
|
|
|
2024
2156
|
|
|
2025
2157
|
|
|
2158
|
+
|
|
2159
|
+
<p class="tag-source">
|
|
2160
|
+
<a href="src_csvToJson.js.html" class="button">View Source</a>
|
|
2161
|
+
<span>
|
|
2162
|
+
<a href="src_csvToJson.js.html">src/csvToJson.js</a>, <a href="src_csvToJson.js.html#line74">line 74</a>
|
|
2163
|
+
</span>
|
|
2164
|
+
</p>
|
|
2026
2165
|
|
|
2027
2166
|
</dl>
|
|
2028
2167
|
|
|
@@ -2038,80 +2177,83 @@ console.log(jsonString);</code></pre>
|
|
|
2038
2177
|
|
|
2039
2178
|
|
|
2040
2179
|
|
|
2041
|
-
<h5>Throws:</h5>
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
2180
|
|
|
2045
|
-
<dl>
|
|
2046
|
-
<dt>
|
|
2047
|
-
<div class="param-desc">
|
|
2048
|
-
<p>If not a valid number</p>
|
|
2049
|
-
</div>
|
|
2050
|
-
</dt>
|
|
2051
|
-
<dd></dd>
|
|
2052
|
-
<dt>
|
|
2053
|
-
<dl>
|
|
2054
|
-
<dt>
|
|
2055
|
-
Type
|
|
2056
|
-
</dt>
|
|
2057
|
-
<dd>
|
|
2058
|
-
|
|
2059
|
-
<span class="param-type"><a href="ConfigurationError.html">ConfigurationError</a></span>
|
|
2060
2181
|
|
|
2061
2182
|
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2183
|
+
<div class='columns method-parameter'>
|
|
2184
|
+
<div class="column is-2"><label>Throws:</label></div>
|
|
2185
|
+
<div class="column is-10">
|
|
2186
|
+
|
|
2187
|
+
|
|
2188
|
+
<div class="columns">
|
|
2189
|
+
|
|
2190
|
+
<div class='param-desc column is-7'><p>If not a valid number</p></div>
|
|
2191
|
+
<div class='column is-5 has-text-left'>
|
|
2192
|
+
<label>Type: </label>
|
|
2193
|
+
<code class="param-type"><a href="ConfigurationError.html">ConfigurationError</a></code>
|
|
2067
2194
|
|
|
2068
2195
|
|
|
2196
|
+
</div>
|
|
2069
2197
|
|
|
2198
|
+
</div>
|
|
2070
2199
|
|
|
2200
|
+
|
|
2201
|
+
</div>
|
|
2202
|
+
</div>
|
|
2071
2203
|
|
|
2072
|
-
<h5>Returns:</h5>
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
<div class="param-desc">
|
|
2076
|
-
<p>For method chaining</p>
|
|
2077
|
-
</div>
|
|
2078
2204
|
|
|
2079
2205
|
|
|
2206
|
+
<div class='columns method-parameter'>
|
|
2207
|
+
<div class="column is-2"><label>Returns:</label></div>
|
|
2208
|
+
<div class="column is-10">
|
|
2209
|
+
|
|
2210
|
+
|
|
2080
2211
|
|
|
2081
|
-
<
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2212
|
+
<div class="columns">
|
|
2213
|
+
|
|
2214
|
+
<div class='param-desc column is-7'><p>For method chaining</p></div>
|
|
2215
|
+
|
|
2216
|
+
|
|
2217
|
+
<div class='column is-5 has-text-left'>
|
|
2218
|
+
<label>Type: </label>
|
|
2086
2219
|
|
|
2087
|
-
<
|
|
2088
|
-
|
|
2220
|
+
<code class="param-type">this</code>
|
|
2089
2221
|
|
|
2090
|
-
</dd>
|
|
2091
|
-
</dl>
|
|
2092
2222
|
|
|
2223
|
+
</div>
|
|
2093
2224
|
|
|
2225
|
+
</div>
|
|
2094
2226
|
|
|
2227
|
+
|
|
2228
|
+
</div>
|
|
2229
|
+
</div>
|
|
2095
2230
|
|
|
2096
2231
|
|
|
2097
2232
|
|
|
2098
2233
|
|
|
2099
|
-
|
|
2234
|
+
</div>
|
|
2100
2235
|
|
|
2236
|
+
<div class="member">
|
|
2101
2237
|
|
|
2102
|
-
|
|
2103
2238
|
|
|
2104
2239
|
|
|
2105
|
-
<h4 class="name" id="mapRows"
|
|
2240
|
+
<h4 class="name" id="mapRows">
|
|
2241
|
+
<a class="href-link" href="#mapRows">#</a>
|
|
2242
|
+
|
|
2243
|
+
<span class="code-name">
|
|
2244
|
+
|
|
2245
|
+
mapRows<span class="signature">(mapperFn)</span><span class="type-signature"> → {this}</span>
|
|
2246
|
+
|
|
2247
|
+
</span>
|
|
2248
|
+
</h4>
|
|
2106
2249
|
|
|
2107
2250
|
|
|
2108
2251
|
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
</div>
|
|
2252
|
+
|
|
2253
|
+
<div class="description">
|
|
2254
|
+
<p>Sets a mapper function to transform each row after conversion</p>
|
|
2255
|
+
</div>
|
|
2256
|
+
|
|
2115
2257
|
|
|
2116
2258
|
|
|
2117
2259
|
|
|
@@ -2123,52 +2265,54 @@ console.log(jsonString);</code></pre>
|
|
|
2123
2265
|
|
|
2124
2266
|
<h5>Parameters:</h5>
|
|
2125
2267
|
|
|
2268
|
+
<div class="table-container">
|
|
2269
|
+
<table class="params table">
|
|
2270
|
+
<thead>
|
|
2271
|
+
<tr>
|
|
2272
|
+
|
|
2273
|
+
<th>Name</th>
|
|
2274
|
+
|
|
2126
2275
|
|
|
2127
|
-
<
|
|
2128
|
-
<thead>
|
|
2129
|
-
<tr>
|
|
2130
|
-
|
|
2131
|
-
<th>Name</th>
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
<th>Type</th>
|
|
2276
|
+
<th>Type</th>
|
|
2135
2277
|
|
|
2136
|
-
|
|
2278
|
+
|
|
2137
2279
|
|
|
2138
|
-
|
|
2280
|
+
|
|
2139
2281
|
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2282
|
+
<th class="last">Description</th>
|
|
2283
|
+
</tr>
|
|
2284
|
+
</thead>
|
|
2143
2285
|
|
|
2144
|
-
|
|
2145
|
-
|
|
2286
|
+
<tbody>
|
|
2287
|
+
|
|
2146
2288
|
|
|
2147
|
-
<tr>
|
|
2148
|
-
|
|
2149
|
-
<td class="name"><code>mapperFn</code></td>
|
|
2150
2289
|
|
|
2290
|
+
<tr class="deep-level-0">
|
|
2291
|
+
|
|
2292
|
+
<td class="name"><code>mapperFn</code></td>
|
|
2293
|
+
|
|
2151
2294
|
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
<
|
|
2295
|
+
<td class="type">
|
|
2296
|
+
|
|
2297
|
+
|
|
2298
|
+
<code class="param-type">function</code>
|
|
2156
2299
|
|
|
2157
2300
|
|
|
2158
|
-
|
|
2159
|
-
|
|
2301
|
+
|
|
2302
|
+
</td>
|
|
2160
2303
|
|
|
2161
|
-
|
|
2304
|
+
|
|
2162
2305
|
|
|
2163
|
-
|
|
2306
|
+
|
|
2164
2307
|
|
|
2165
|
-
|
|
2166
|
-
|
|
2308
|
+
<td class="description last"><p>Function that receives (row, index) and returns transformed row or null to filter out</p></td>
|
|
2309
|
+
</tr>
|
|
2167
2310
|
|
|
2168
|
-
|
|
2169
|
-
</tbody>
|
|
2170
|
-
</table>
|
|
2171
2311
|
|
|
2312
|
+
|
|
2313
|
+
</tbody>
|
|
2314
|
+
</table>
|
|
2315
|
+
</div>
|
|
2172
2316
|
|
|
2173
2317
|
|
|
2174
2318
|
|
|
@@ -2199,18 +2343,19 @@ console.log(jsonString);</code></pre>
|
|
|
2199
2343
|
|
|
2200
2344
|
|
|
2201
2345
|
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
<dt class="tag-source">Source:</dt>
|
|
2205
|
-
<dd class="tag-source"><ul class="dummy"><li>
|
|
2206
|
-
<a href="src_csvToJson.js.html">src/csvToJson.js</a>, <a href="src_csvToJson.js.html#line114">line 114</a>
|
|
2207
|
-
</li></ul></dd>
|
|
2208
2346
|
|
|
2209
2347
|
|
|
2210
2348
|
|
|
2211
2349
|
|
|
2212
2350
|
|
|
2213
2351
|
|
|
2352
|
+
|
|
2353
|
+
<p class="tag-source">
|
|
2354
|
+
<a href="src_csvToJson.js.html" class="button">View Source</a>
|
|
2355
|
+
<span>
|
|
2356
|
+
<a href="src_csvToJson.js.html">src/csvToJson.js</a>, <a href="src_csvToJson.js.html#line115">line 115</a>
|
|
2357
|
+
</span>
|
|
2358
|
+
</p>
|
|
2214
2359
|
|
|
2215
2360
|
</dl>
|
|
2216
2361
|
|
|
@@ -2228,52 +2373,61 @@ console.log(jsonString);</code></pre>
|
|
|
2228
2373
|
|
|
2229
2374
|
|
|
2230
2375
|
|
|
2231
|
-
<h5>Returns:</h5>
|
|
2232
2376
|
|
|
2233
|
-
|
|
2234
|
-
<div class="param-desc">
|
|
2235
|
-
<ul>
|
|
2236
|
-
<li>For method chaining</li>
|
|
2237
|
-
</ul>
|
|
2238
|
-
</div>
|
|
2239
2377
|
|
|
2240
2378
|
|
|
2379
|
+
<div class='columns method-parameter'>
|
|
2380
|
+
<div class="column is-2"><label>Returns:</label></div>
|
|
2381
|
+
<div class="column is-10">
|
|
2382
|
+
|
|
2383
|
+
|
|
2241
2384
|
|
|
2242
|
-
<
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2385
|
+
<div class="columns">
|
|
2386
|
+
|
|
2387
|
+
<div class='param-desc column is-7'><p>For method chaining</p></div>
|
|
2388
|
+
|
|
2389
|
+
|
|
2390
|
+
<div class='column is-5 has-text-left'>
|
|
2391
|
+
<label>Type: </label>
|
|
2247
2392
|
|
|
2248
|
-
<
|
|
2249
|
-
|
|
2393
|
+
<code class="param-type">this</code>
|
|
2250
2394
|
|
|
2251
|
-
</dd>
|
|
2252
|
-
</dl>
|
|
2253
2395
|
|
|
2396
|
+
</div>
|
|
2254
2397
|
|
|
2398
|
+
</div>
|
|
2255
2399
|
|
|
2400
|
+
|
|
2401
|
+
</div>
|
|
2402
|
+
</div>
|
|
2256
2403
|
|
|
2257
2404
|
|
|
2258
2405
|
|
|
2259
2406
|
|
|
2260
|
-
|
|
2407
|
+
</div>
|
|
2261
2408
|
|
|
2409
|
+
<div class="member">
|
|
2262
2410
|
|
|
2263
|
-
|
|
2264
2411
|
|
|
2265
2412
|
|
|
2266
|
-
<h4 class="name" id="parseRecords"
|
|
2413
|
+
<h4 class="name" id="parseRecords">
|
|
2414
|
+
<a class="href-link" href="#parseRecords">#</a>
|
|
2415
|
+
|
|
2416
|
+
<span class="code-name">
|
|
2417
|
+
|
|
2418
|
+
parseRecords<span class="signature">(csvContent)</span><span class="type-signature"> → {Array.<string>}</span>
|
|
2419
|
+
|
|
2420
|
+
</span>
|
|
2421
|
+
</h4>
|
|
2267
2422
|
|
|
2268
2423
|
|
|
2269
2424
|
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
<div class="description">
|
|
2274
|
-
<p>Parse CSV content into individual records, respecting quoted fields that may span multiple lines.
|
|
2425
|
+
|
|
2426
|
+
<div class="description">
|
|
2427
|
+
<p>Parse CSV content into individual records, respecting quoted fields that may span multiple lines.
|
|
2275
2428
|
RFC 4180 compliant parsing - handles quoted fields that may contain newlines.</p>
|
|
2276
|
-
</div>
|
|
2429
|
+
</div>
|
|
2430
|
+
|
|
2277
2431
|
|
|
2278
2432
|
|
|
2279
2433
|
|
|
@@ -2285,52 +2439,54 @@ RFC 4180 compliant parsing - handles quoted fields that may contain newlines.</p
|
|
|
2285
2439
|
|
|
2286
2440
|
<h5>Parameters:</h5>
|
|
2287
2441
|
|
|
2442
|
+
<div class="table-container">
|
|
2443
|
+
<table class="params table">
|
|
2444
|
+
<thead>
|
|
2445
|
+
<tr>
|
|
2446
|
+
|
|
2447
|
+
<th>Name</th>
|
|
2448
|
+
|
|
2288
2449
|
|
|
2289
|
-
<
|
|
2290
|
-
<thead>
|
|
2291
|
-
<tr>
|
|
2292
|
-
|
|
2293
|
-
<th>Name</th>
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
<th>Type</th>
|
|
2450
|
+
<th>Type</th>
|
|
2297
2451
|
|
|
2298
|
-
|
|
2452
|
+
|
|
2299
2453
|
|
|
2300
|
-
|
|
2454
|
+
|
|
2301
2455
|
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2456
|
+
<th class="last">Description</th>
|
|
2457
|
+
</tr>
|
|
2458
|
+
</thead>
|
|
2305
2459
|
|
|
2306
|
-
|
|
2307
|
-
|
|
2460
|
+
<tbody>
|
|
2461
|
+
|
|
2308
2462
|
|
|
2309
|
-
<tr>
|
|
2310
|
-
|
|
2311
|
-
<td class="name"><code>csvContent</code></td>
|
|
2312
2463
|
|
|
2464
|
+
<tr class="deep-level-0">
|
|
2465
|
+
|
|
2466
|
+
<td class="name"><code>csvContent</code></td>
|
|
2467
|
+
|
|
2313
2468
|
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
<
|
|
2469
|
+
<td class="type">
|
|
2470
|
+
|
|
2471
|
+
|
|
2472
|
+
<code class="param-type">string</code>
|
|
2318
2473
|
|
|
2319
2474
|
|
|
2320
|
-
|
|
2321
|
-
|
|
2475
|
+
|
|
2476
|
+
</td>
|
|
2322
2477
|
|
|
2323
|
-
|
|
2478
|
+
|
|
2324
2479
|
|
|
2325
|
-
|
|
2480
|
+
|
|
2326
2481
|
|
|
2327
|
-
|
|
2328
|
-
|
|
2482
|
+
<td class="description last"><p>The raw CSV content</p></td>
|
|
2483
|
+
</tr>
|
|
2329
2484
|
|
|
2330
|
-
|
|
2331
|
-
</tbody>
|
|
2332
|
-
</table>
|
|
2333
2485
|
|
|
2486
|
+
|
|
2487
|
+
</tbody>
|
|
2488
|
+
</table>
|
|
2489
|
+
</div>
|
|
2334
2490
|
|
|
2335
2491
|
|
|
2336
2492
|
|
|
@@ -2361,18 +2517,19 @@ RFC 4180 compliant parsing - handles quoted fields that may contain newlines.</p
|
|
|
2361
2517
|
|
|
2362
2518
|
|
|
2363
2519
|
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
<dt class="tag-source">Source:</dt>
|
|
2367
|
-
<dd class="tag-source"><ul class="dummy"><li>
|
|
2368
|
-
<a href="src_csvToJson.js.html">src/csvToJson.js</a>, <a href="src_csvToJson.js.html#line270">line 270</a>
|
|
2369
|
-
</li></ul></dd>
|
|
2370
2520
|
|
|
2371
2521
|
|
|
2372
2522
|
|
|
2373
2523
|
|
|
2374
2524
|
|
|
2375
2525
|
|
|
2526
|
+
|
|
2527
|
+
<p class="tag-source">
|
|
2528
|
+
<a href="src_csvToJson.js.html" class="button">View Source</a>
|
|
2529
|
+
<span>
|
|
2530
|
+
<a href="src_csvToJson.js.html">src/csvToJson.js</a>, <a href="src_csvToJson.js.html#line271">line 271</a>
|
|
2531
|
+
</span>
|
|
2532
|
+
</p>
|
|
2376
2533
|
|
|
2377
2534
|
</dl>
|
|
2378
2535
|
|
|
@@ -2390,50 +2547,61 @@ RFC 4180 compliant parsing - handles quoted fields that may contain newlines.</p
|
|
|
2390
2547
|
|
|
2391
2548
|
|
|
2392
2549
|
|
|
2393
|
-
<h5>Returns:</h5>
|
|
2394
2550
|
|
|
2395
|
-
|
|
2396
|
-
<div class="param-desc">
|
|
2397
|
-
<p>Array of record strings</p>
|
|
2398
|
-
</div>
|
|
2399
2551
|
|
|
2400
2552
|
|
|
2553
|
+
<div class='columns method-parameter'>
|
|
2554
|
+
<div class="column is-2"><label>Returns:</label></div>
|
|
2555
|
+
<div class="column is-10">
|
|
2556
|
+
|
|
2557
|
+
|
|
2401
2558
|
|
|
2402
|
-
<
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2559
|
+
<div class="columns">
|
|
2560
|
+
|
|
2561
|
+
<div class='param-desc column is-7'><p>Array of record strings</p></div>
|
|
2562
|
+
|
|
2563
|
+
|
|
2564
|
+
<div class='column is-5 has-text-left'>
|
|
2565
|
+
<label>Type: </label>
|
|
2407
2566
|
|
|
2408
|
-
<
|
|
2567
|
+
<code class="param-type">Array.<string></code>
|
|
2409
2568
|
|
|
2410
2569
|
|
|
2411
|
-
</
|
|
2412
|
-
</dl>
|
|
2413
|
-
|
|
2570
|
+
</div>
|
|
2414
2571
|
|
|
2572
|
+
</div>
|
|
2415
2573
|
|
|
2574
|
+
|
|
2575
|
+
</div>
|
|
2576
|
+
</div>
|
|
2416
2577
|
|
|
2417
2578
|
|
|
2418
2579
|
|
|
2419
2580
|
|
|
2420
|
-
|
|
2581
|
+
</div>
|
|
2421
2582
|
|
|
2583
|
+
<div class="member">
|
|
2422
2584
|
|
|
2423
|
-
|
|
2424
2585
|
|
|
2425
2586
|
|
|
2426
|
-
<h4 class="name" id="parseSubArray"
|
|
2587
|
+
<h4 class="name" id="parseSubArray">
|
|
2588
|
+
<a class="href-link" href="#parseSubArray">#</a>
|
|
2589
|
+
|
|
2590
|
+
<span class="code-name">
|
|
2591
|
+
|
|
2592
|
+
parseSubArray<span class="signature">(delimiter, separator)</span><span class="type-signature"> → {this}</span>
|
|
2593
|
+
|
|
2594
|
+
</span>
|
|
2595
|
+
</h4>
|
|
2427
2596
|
|
|
2428
2597
|
|
|
2429
2598
|
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
<div class="description">
|
|
2434
|
-
<p>Configure sub-array parsing for special field values
|
|
2599
|
+
|
|
2600
|
+
<div class="description">
|
|
2601
|
+
<p>Configure sub-array parsing for special field values
|
|
2435
2602
|
Fields bracketed by delimiter and containing separator are parsed into arrays</p>
|
|
2436
|
-
</div>
|
|
2603
|
+
</div>
|
|
2604
|
+
|
|
2437
2605
|
|
|
2438
2606
|
|
|
2439
2607
|
|
|
@@ -2445,97 +2613,99 @@ Fields bracketed by delimiter and containing separator are parsed into arrays</p
|
|
|
2445
2613
|
|
|
2446
2614
|
<h5>Parameters:</h5>
|
|
2447
2615
|
|
|
2616
|
+
<div class="table-container">
|
|
2617
|
+
<table class="params table">
|
|
2618
|
+
<thead>
|
|
2619
|
+
<tr>
|
|
2620
|
+
|
|
2621
|
+
<th>Name</th>
|
|
2622
|
+
|
|
2448
2623
|
|
|
2449
|
-
<
|
|
2450
|
-
<thead>
|
|
2451
|
-
<tr>
|
|
2452
|
-
|
|
2453
|
-
<th>Name</th>
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
<th>Type</th>
|
|
2624
|
+
<th>Type</th>
|
|
2457
2625
|
|
|
2458
|
-
|
|
2626
|
+
|
|
2459
2627
|
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
|
|
2628
|
+
|
|
2629
|
+
<th>Default</th>
|
|
2630
|
+
|
|
2463
2631
|
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2632
|
+
<th class="last">Description</th>
|
|
2633
|
+
</tr>
|
|
2634
|
+
</thead>
|
|
2467
2635
|
|
|
2468
|
-
|
|
2469
|
-
|
|
2636
|
+
<tbody>
|
|
2637
|
+
|
|
2470
2638
|
|
|
2471
|
-
<tr>
|
|
2472
|
-
|
|
2473
|
-
<td class="name"><code>delimiter</code></td>
|
|
2474
2639
|
|
|
2640
|
+
<tr class="deep-level-0">
|
|
2641
|
+
|
|
2642
|
+
<td class="name"><code>delimiter</code></td>
|
|
2643
|
+
|
|
2475
2644
|
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
<
|
|
2645
|
+
<td class="type">
|
|
2646
|
+
|
|
2647
|
+
|
|
2648
|
+
<code class="param-type">string</code>
|
|
2480
2649
|
|
|
2481
2650
|
|
|
2482
|
-
|
|
2483
|
-
|
|
2651
|
+
|
|
2652
|
+
</td>
|
|
2484
2653
|
|
|
2485
|
-
|
|
2654
|
+
|
|
2486
2655
|
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
|
|
2656
|
+
|
|
2657
|
+
<td class="default">
|
|
2658
|
+
|
|
2659
|
+
*
|
|
2660
|
+
|
|
2661
|
+
</td>
|
|
2662
|
+
|
|
2494
2663
|
|
|
2495
|
-
|
|
2496
|
-
|
|
2664
|
+
<td class="description last"><p>Bracket character (default: '*')</p></td>
|
|
2665
|
+
</tr>
|
|
2497
2666
|
|
|
2498
|
-
|
|
2499
2667
|
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
<td class="name"><code>separator</code></td>
|
|
2503
|
-
|
|
2668
|
+
|
|
2504
2669
|
|
|
2505
|
-
<td class="type">
|
|
2506
2670
|
|
|
2507
|
-
|
|
2508
|
-
|
|
2671
|
+
<tr class="deep-level-0">
|
|
2672
|
+
|
|
2673
|
+
<td class="name"><code>separator</code></td>
|
|
2674
|
+
|
|
2509
2675
|
|
|
2676
|
+
<td class="type">
|
|
2677
|
+
|
|
2678
|
+
|
|
2679
|
+
<code class="param-type">string</code>
|
|
2510
2680
|
|
|
2511
|
-
|
|
2512
|
-
</td>
|
|
2513
2681
|
|
|
2514
|
-
|
|
2682
|
+
|
|
2683
|
+
</td>
|
|
2515
2684
|
|
|
2516
|
-
|
|
2517
|
-
<td class="default">
|
|
2518
|
-
|
|
2519
|
-
,
|
|
2520
|
-
|
|
2521
|
-
</td>
|
|
2522
|
-
|
|
2685
|
+
|
|
2523
2686
|
|
|
2524
|
-
|
|
2525
|
-
|
|
2687
|
+
|
|
2688
|
+
<td class="default">
|
|
2689
|
+
|
|
2690
|
+
,
|
|
2691
|
+
|
|
2692
|
+
</td>
|
|
2693
|
+
|
|
2526
2694
|
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
</table>
|
|
2695
|
+
<td class="description last"><p>Item separator within brackets (default: ',')</p></td>
|
|
2696
|
+
</tr>
|
|
2530
2697
|
|
|
2531
2698
|
|
|
2699
|
+
|
|
2700
|
+
</tbody>
|
|
2701
|
+
</table>
|
|
2702
|
+
</div>
|
|
2532
2703
|
|
|
2533
2704
|
|
|
2534
2705
|
|
|
2535
2706
|
|
|
2536
|
-
<dl class="details">
|
|
2537
2707
|
|
|
2538
|
-
|
|
2708
|
+
<dl class="details">
|
|
2539
2709
|
|
|
2540
2710
|
|
|
2541
2711
|
|
|
@@ -2560,16 +2730,19 @@ Fields bracketed by delimiter and containing separator are parsed into arrays</p
|
|
|
2560
2730
|
|
|
2561
2731
|
|
|
2562
2732
|
|
|
2563
|
-
<dt class="tag-source">Source:</dt>
|
|
2564
|
-
<dd class="tag-source"><ul class="dummy"><li>
|
|
2565
|
-
<a href="src_csvToJson.js.html">src/csvToJson.js</a>, <a href="src_csvToJson.js.html#line93">line 93</a>
|
|
2566
|
-
</li></ul></dd>
|
|
2567
2733
|
|
|
2568
2734
|
|
|
2569
2735
|
|
|
2570
2736
|
|
|
2571
2737
|
|
|
2572
2738
|
|
|
2739
|
+
|
|
2740
|
+
<p class="tag-source">
|
|
2741
|
+
<a href="src_csvToJson.js.html" class="button">View Source</a>
|
|
2742
|
+
<span>
|
|
2743
|
+
<a href="src_csvToJson.js.html">src/csvToJson.js</a>, <a href="src_csvToJson.js.html#line94">line 94</a>
|
|
2744
|
+
</span>
|
|
2745
|
+
</p>
|
|
2573
2746
|
|
|
2574
2747
|
</dl>
|
|
2575
2748
|
|
|
@@ -2587,62 +2760,75 @@ Fields bracketed by delimiter and containing separator are parsed into arrays</p
|
|
|
2587
2760
|
|
|
2588
2761
|
|
|
2589
2762
|
|
|
2590
|
-
<h5>Returns:</h5>
|
|
2591
2763
|
|
|
2592
|
-
|
|
2593
|
-
<div class="param-desc">
|
|
2594
|
-
<p>For method chaining</p>
|
|
2595
|
-
</div>
|
|
2596
2764
|
|
|
2597
2765
|
|
|
2766
|
+
<div class='columns method-parameter'>
|
|
2767
|
+
<div class="column is-2"><label>Returns:</label></div>
|
|
2768
|
+
<div class="column is-10">
|
|
2769
|
+
|
|
2770
|
+
|
|
2598
2771
|
|
|
2599
|
-
<
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
|
|
2772
|
+
<div class="columns">
|
|
2773
|
+
|
|
2774
|
+
<div class='param-desc column is-7'><p>For method chaining</p></div>
|
|
2775
|
+
|
|
2776
|
+
|
|
2777
|
+
<div class='column is-5 has-text-left'>
|
|
2778
|
+
<label>Type: </label>
|
|
2604
2779
|
|
|
2605
|
-
<
|
|
2780
|
+
<code class="param-type">this</code>
|
|
2606
2781
|
|
|
2607
2782
|
|
|
2608
|
-
</
|
|
2609
|
-
</dl>
|
|
2610
|
-
|
|
2783
|
+
</div>
|
|
2611
2784
|
|
|
2785
|
+
</div>
|
|
2786
|
+
|
|
2787
|
+
|
|
2788
|
+
</div>
|
|
2789
|
+
</div>
|
|
2612
2790
|
|
|
2613
2791
|
|
|
2614
2792
|
|
|
2615
2793
|
|
|
2616
2794
|
<h5>Example</h5>
|
|
2617
2795
|
|
|
2618
|
-
|
|
2796
|
+
|
|
2797
|
+
<pre class="prettyprint"><code>// Input: "*val1,val2,val3*"
|
|
2619
2798
|
// Output: ["val1", "val2", "val3"]
|
|
2620
2799
|
.parseSubArray('*', ',')</code></pre>
|
|
2800
|
+
|
|
2621
2801
|
|
|
2622
2802
|
|
|
2623
|
-
|
|
2624
|
-
|
|
2803
|
+
</div>
|
|
2625
2804
|
|
|
2805
|
+
<div class="member">
|
|
2626
2806
|
|
|
2627
|
-
|
|
2628
2807
|
|
|
2629
2808
|
|
|
2630
|
-
<h4 class="name" id="split"
|
|
2809
|
+
<h4 class="name" id="split">
|
|
2810
|
+
<a class="href-link" href="#split">#</a>
|
|
2811
|
+
|
|
2812
|
+
<span class="code-name">
|
|
2813
|
+
|
|
2814
|
+
split<span class="signature">(line)</span><span class="type-signature"> → {Array.<string>}</span>
|
|
2815
|
+
|
|
2816
|
+
</span>
|
|
2817
|
+
</h4>
|
|
2631
2818
|
|
|
2632
2819
|
|
|
2633
2820
|
|
|
2634
|
-
|
|
2635
|
-
|
|
2636
|
-
|
|
2637
|
-
<div class="description">
|
|
2638
|
-
<p>Split a CSV record line into fields, respecting quoted fields per RFC 4180.
|
|
2821
|
+
|
|
2822
|
+
<div class="description">
|
|
2823
|
+
<p>Split a CSV record line into fields, respecting quoted fields per RFC 4180.
|
|
2639
2824
|
Handles:</p>
|
|
2640
2825
|
<ul>
|
|
2641
2826
|
<li>Quoted fields with embedded delimiters and newlines</li>
|
|
2642
2827
|
<li>Escaped quotes (double quotes within quoted fields)</li>
|
|
2643
2828
|
<li>Empty quoted fields</li>
|
|
2644
2829
|
</ul>
|
|
2645
|
-
</div>
|
|
2830
|
+
</div>
|
|
2831
|
+
|
|
2646
2832
|
|
|
2647
2833
|
|
|
2648
2834
|
|
|
@@ -2654,52 +2840,54 @@ Handles:</p>
|
|
|
2654
2840
|
|
|
2655
2841
|
<h5>Parameters:</h5>
|
|
2656
2842
|
|
|
2843
|
+
<div class="table-container">
|
|
2844
|
+
<table class="params table">
|
|
2845
|
+
<thead>
|
|
2846
|
+
<tr>
|
|
2847
|
+
|
|
2848
|
+
<th>Name</th>
|
|
2849
|
+
|
|
2657
2850
|
|
|
2658
|
-
<
|
|
2659
|
-
<thead>
|
|
2660
|
-
<tr>
|
|
2661
|
-
|
|
2662
|
-
<th>Name</th>
|
|
2663
|
-
|
|
2664
|
-
|
|
2665
|
-
<th>Type</th>
|
|
2851
|
+
<th>Type</th>
|
|
2666
2852
|
|
|
2667
|
-
|
|
2853
|
+
|
|
2668
2854
|
|
|
2669
|
-
|
|
2855
|
+
|
|
2670
2856
|
|
|
2671
|
-
|
|
2672
|
-
|
|
2673
|
-
|
|
2857
|
+
<th class="last">Description</th>
|
|
2858
|
+
</tr>
|
|
2859
|
+
</thead>
|
|
2674
2860
|
|
|
2675
|
-
|
|
2676
|
-
|
|
2861
|
+
<tbody>
|
|
2862
|
+
|
|
2677
2863
|
|
|
2678
|
-
<tr>
|
|
2679
|
-
|
|
2680
|
-
<td class="name"><code>line</code></td>
|
|
2681
2864
|
|
|
2865
|
+
<tr class="deep-level-0">
|
|
2866
|
+
|
|
2867
|
+
<td class="name"><code>line</code></td>
|
|
2868
|
+
|
|
2682
2869
|
|
|
2683
|
-
|
|
2684
|
-
|
|
2685
|
-
|
|
2686
|
-
<
|
|
2870
|
+
<td class="type">
|
|
2871
|
+
|
|
2872
|
+
|
|
2873
|
+
<code class="param-type">string</code>
|
|
2687
2874
|
|
|
2688
2875
|
|
|
2689
|
-
|
|
2690
|
-
|
|
2876
|
+
|
|
2877
|
+
</td>
|
|
2691
2878
|
|
|
2692
|
-
|
|
2879
|
+
|
|
2693
2880
|
|
|
2694
|
-
|
|
2881
|
+
|
|
2695
2882
|
|
|
2696
|
-
|
|
2697
|
-
|
|
2883
|
+
<td class="description last"><p>A single CSV record line</p></td>
|
|
2884
|
+
</tr>
|
|
2698
2885
|
|
|
2699
|
-
|
|
2700
|
-
</tbody>
|
|
2701
|
-
</table>
|
|
2702
2886
|
|
|
2887
|
+
|
|
2888
|
+
</tbody>
|
|
2889
|
+
</table>
|
|
2890
|
+
</div>
|
|
2703
2891
|
|
|
2704
2892
|
|
|
2705
2893
|
|
|
@@ -2730,18 +2918,19 @@ Handles:</p>
|
|
|
2730
2918
|
|
|
2731
2919
|
|
|
2732
2920
|
|
|
2733
|
-
|
|
2734
|
-
|
|
2735
|
-
<dt class="tag-source">Source:</dt>
|
|
2736
|
-
<dd class="tag-source"><ul class="dummy"><li>
|
|
2737
|
-
<a href="src_csvToJson.js.html">src/csvToJson.js</a>, <a href="src_csvToJson.js.html#line467">line 467</a>
|
|
2738
|
-
</li></ul></dd>
|
|
2739
2921
|
|
|
2740
2922
|
|
|
2741
2923
|
|
|
2742
2924
|
|
|
2743
2925
|
|
|
2744
2926
|
|
|
2927
|
+
|
|
2928
|
+
<p class="tag-source">
|
|
2929
|
+
<a href="src_csvToJson.js.html" class="button">View Source</a>
|
|
2930
|
+
<span>
|
|
2931
|
+
<a href="src_csvToJson.js.html">src/csvToJson.js</a>, <a href="src_csvToJson.js.html#line468">line 468</a>
|
|
2932
|
+
</span>
|
|
2933
|
+
</p>
|
|
2745
2934
|
|
|
2746
2935
|
</dl>
|
|
2747
2936
|
|
|
@@ -2759,50 +2948,61 @@ Handles:</p>
|
|
|
2759
2948
|
|
|
2760
2949
|
|
|
2761
2950
|
|
|
2762
|
-
<h5>Returns:</h5>
|
|
2763
2951
|
|
|
2764
|
-
|
|
2765
|
-
<div class="param-desc">
|
|
2766
|
-
<p>Array of field values</p>
|
|
2767
|
-
</div>
|
|
2768
2952
|
|
|
2769
2953
|
|
|
2954
|
+
<div class='columns method-parameter'>
|
|
2955
|
+
<div class="column is-2"><label>Returns:</label></div>
|
|
2956
|
+
<div class="column is-10">
|
|
2957
|
+
|
|
2958
|
+
|
|
2770
2959
|
|
|
2771
|
-
<
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
|
|
2960
|
+
<div class="columns">
|
|
2961
|
+
|
|
2962
|
+
<div class='param-desc column is-7'><p>Array of field values</p></div>
|
|
2963
|
+
|
|
2964
|
+
|
|
2965
|
+
<div class='column is-5 has-text-left'>
|
|
2966
|
+
<label>Type: </label>
|
|
2776
2967
|
|
|
2777
|
-
<
|
|
2778
|
-
|
|
2968
|
+
<code class="param-type">Array.<string></code>
|
|
2779
2969
|
|
|
2780
|
-
</dd>
|
|
2781
|
-
</dl>
|
|
2782
2970
|
|
|
2971
|
+
</div>
|
|
2783
2972
|
|
|
2973
|
+
</div>
|
|
2784
2974
|
|
|
2975
|
+
|
|
2976
|
+
</div>
|
|
2977
|
+
</div>
|
|
2785
2978
|
|
|
2786
2979
|
|
|
2787
2980
|
|
|
2788
2981
|
|
|
2789
|
-
|
|
2982
|
+
</div>
|
|
2790
2983
|
|
|
2984
|
+
<div class="member">
|
|
2791
2985
|
|
|
2792
|
-
|
|
2793
2986
|
|
|
2794
2987
|
|
|
2795
|
-
<h4 class="name" id="supportQuotedField"
|
|
2988
|
+
<h4 class="name" id="supportQuotedField">
|
|
2989
|
+
<a class="href-link" href="#supportQuotedField">#</a>
|
|
2990
|
+
|
|
2991
|
+
<span class="code-name">
|
|
2992
|
+
|
|
2993
|
+
supportQuotedField<span class="signature">(active)</span><span class="type-signature"> → {this}</span>
|
|
2994
|
+
|
|
2995
|
+
</span>
|
|
2996
|
+
</h4>
|
|
2796
2997
|
|
|
2797
2998
|
|
|
2798
2999
|
|
|
2799
|
-
|
|
2800
|
-
|
|
2801
|
-
|
|
2802
|
-
<div class="description">
|
|
2803
|
-
<p>Enable or disable support for RFC 4180 quoted fields
|
|
3000
|
+
|
|
3001
|
+
<div class="description">
|
|
3002
|
+
<p>Enable or disable support for RFC 4180 quoted fields
|
|
2804
3003
|
When enabled, fields wrapped in double quotes can contain delimiters and newlines</p>
|
|
2805
|
-
</div>
|
|
3004
|
+
</div>
|
|
3005
|
+
|
|
2806
3006
|
|
|
2807
3007
|
|
|
2808
3008
|
|
|
@@ -2814,52 +3014,54 @@ When enabled, fields wrapped in double quotes can contain delimiters and newline
|
|
|
2814
3014
|
|
|
2815
3015
|
<h5>Parameters:</h5>
|
|
2816
3016
|
|
|
3017
|
+
<div class="table-container">
|
|
3018
|
+
<table class="params table">
|
|
3019
|
+
<thead>
|
|
3020
|
+
<tr>
|
|
3021
|
+
|
|
3022
|
+
<th>Name</th>
|
|
3023
|
+
|
|
2817
3024
|
|
|
2818
|
-
<
|
|
2819
|
-
<thead>
|
|
2820
|
-
<tr>
|
|
2821
|
-
|
|
2822
|
-
<th>Name</th>
|
|
2823
|
-
|
|
2824
|
-
|
|
2825
|
-
<th>Type</th>
|
|
3025
|
+
<th>Type</th>
|
|
2826
3026
|
|
|
2827
|
-
|
|
3027
|
+
|
|
2828
3028
|
|
|
2829
|
-
|
|
3029
|
+
|
|
2830
3030
|
|
|
2831
|
-
|
|
2832
|
-
|
|
2833
|
-
|
|
3031
|
+
<th class="last">Description</th>
|
|
3032
|
+
</tr>
|
|
3033
|
+
</thead>
|
|
2834
3034
|
|
|
2835
|
-
|
|
2836
|
-
|
|
3035
|
+
<tbody>
|
|
3036
|
+
|
|
2837
3037
|
|
|
2838
|
-
<tr>
|
|
2839
|
-
|
|
2840
|
-
<td class="name"><code>active</code></td>
|
|
2841
3038
|
|
|
3039
|
+
<tr class="deep-level-0">
|
|
3040
|
+
|
|
3041
|
+
<td class="name"><code>active</code></td>
|
|
3042
|
+
|
|
2842
3043
|
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
|
|
2846
|
-
<
|
|
3044
|
+
<td class="type">
|
|
3045
|
+
|
|
3046
|
+
|
|
3047
|
+
<code class="param-type">boolean</code>
|
|
2847
3048
|
|
|
2848
3049
|
|
|
2849
|
-
|
|
2850
|
-
|
|
3050
|
+
|
|
3051
|
+
</td>
|
|
2851
3052
|
|
|
2852
|
-
|
|
3053
|
+
|
|
2853
3054
|
|
|
2854
|
-
|
|
3055
|
+
|
|
2855
3056
|
|
|
2856
|
-
|
|
2857
|
-
|
|
3057
|
+
<td class="description last"><p>Whether to support quoted fields</p></td>
|
|
3058
|
+
</tr>
|
|
2858
3059
|
|
|
2859
|
-
|
|
2860
|
-
</tbody>
|
|
2861
|
-
</table>
|
|
2862
3060
|
|
|
3061
|
+
|
|
3062
|
+
</tbody>
|
|
3063
|
+
</table>
|
|
3064
|
+
</div>
|
|
2863
3065
|
|
|
2864
3066
|
|
|
2865
3067
|
|
|
@@ -2890,18 +3092,19 @@ When enabled, fields wrapped in double quotes can contain delimiters and newline
|
|
|
2890
3092
|
|
|
2891
3093
|
|
|
2892
3094
|
|
|
2893
|
-
|
|
2894
|
-
|
|
2895
|
-
<dt class="tag-source">Source:</dt>
|
|
2896
|
-
<dd class="tag-source"><ul class="dummy"><li>
|
|
2897
|
-
<a href="src_csvToJson.js.html">src/csvToJson.js</a>, <a href="src_csvToJson.js.html#line42">line 42</a>
|
|
2898
|
-
</li></ul></dd>
|
|
2899
3095
|
|
|
2900
3096
|
|
|
2901
3097
|
|
|
2902
3098
|
|
|
2903
3099
|
|
|
2904
3100
|
|
|
3101
|
+
|
|
3102
|
+
<p class="tag-source">
|
|
3103
|
+
<a href="src_csvToJson.js.html" class="button">View Source</a>
|
|
3104
|
+
<span>
|
|
3105
|
+
<a href="src_csvToJson.js.html">src/csvToJson.js</a>, <a href="src_csvToJson.js.html#line43">line 43</a>
|
|
3106
|
+
</span>
|
|
3107
|
+
</p>
|
|
2905
3108
|
|
|
2906
3109
|
</dl>
|
|
2907
3110
|
|
|
@@ -2919,49 +3122,60 @@ When enabled, fields wrapped in double quotes can contain delimiters and newline
|
|
|
2919
3122
|
|
|
2920
3123
|
|
|
2921
3124
|
|
|
2922
|
-
<h5>Returns:</h5>
|
|
2923
3125
|
|
|
2924
|
-
|
|
2925
|
-
<div class="param-desc">
|
|
2926
|
-
<p>For method chaining</p>
|
|
2927
|
-
</div>
|
|
2928
3126
|
|
|
2929
3127
|
|
|
3128
|
+
<div class='columns method-parameter'>
|
|
3129
|
+
<div class="column is-2"><label>Returns:</label></div>
|
|
3130
|
+
<div class="column is-10">
|
|
3131
|
+
|
|
3132
|
+
|
|
2930
3133
|
|
|
2931
|
-
<
|
|
2932
|
-
|
|
2933
|
-
|
|
2934
|
-
|
|
2935
|
-
|
|
3134
|
+
<div class="columns">
|
|
3135
|
+
|
|
3136
|
+
<div class='param-desc column is-7'><p>For method chaining</p></div>
|
|
3137
|
+
|
|
3138
|
+
|
|
3139
|
+
<div class='column is-5 has-text-left'>
|
|
3140
|
+
<label>Type: </label>
|
|
2936
3141
|
|
|
2937
|
-
<
|
|
3142
|
+
<code class="param-type">this</code>
|
|
2938
3143
|
|
|
2939
3144
|
|
|
2940
|
-
</
|
|
2941
|
-
</dl>
|
|
2942
|
-
|
|
3145
|
+
</div>
|
|
2943
3146
|
|
|
3147
|
+
</div>
|
|
2944
3148
|
|
|
3149
|
+
|
|
3150
|
+
</div>
|
|
3151
|
+
</div>
|
|
2945
3152
|
|
|
2946
3153
|
|
|
2947
3154
|
|
|
2948
3155
|
|
|
2949
|
-
|
|
3156
|
+
</div>
|
|
2950
3157
|
|
|
3158
|
+
<div class="member">
|
|
2951
3159
|
|
|
2952
|
-
|
|
2953
3160
|
|
|
2954
3161
|
|
|
2955
|
-
<h4 class="name" id="trimHeaderFieldWhiteSpace"
|
|
3162
|
+
<h4 class="name" id="trimHeaderFieldWhiteSpace">
|
|
3163
|
+
<a class="href-link" href="#trimHeaderFieldWhiteSpace">#</a>
|
|
3164
|
+
|
|
3165
|
+
<span class="code-name">
|
|
3166
|
+
|
|
3167
|
+
trimHeaderFieldWhiteSpace<span class="signature">(active)</span><span class="type-signature"> → {this}</span>
|
|
3168
|
+
|
|
3169
|
+
</span>
|
|
3170
|
+
</h4>
|
|
2956
3171
|
|
|
2957
3172
|
|
|
2958
3173
|
|
|
2959
|
-
|
|
2960
|
-
|
|
2961
|
-
|
|
2962
|
-
|
|
2963
|
-
|
|
2964
|
-
</div>
|
|
3174
|
+
|
|
3175
|
+
<div class="description">
|
|
3176
|
+
<p>Configure whitespace handling in header field names</p>
|
|
3177
|
+
</div>
|
|
3178
|
+
|
|
2965
3179
|
|
|
2966
3180
|
|
|
2967
3181
|
|
|
@@ -2973,52 +3187,54 @@ When enabled, fields wrapped in double quotes can contain delimiters and newline
|
|
|
2973
3187
|
|
|
2974
3188
|
<h5>Parameters:</h5>
|
|
2975
3189
|
|
|
3190
|
+
<div class="table-container">
|
|
3191
|
+
<table class="params table">
|
|
3192
|
+
<thead>
|
|
3193
|
+
<tr>
|
|
3194
|
+
|
|
3195
|
+
<th>Name</th>
|
|
3196
|
+
|
|
2976
3197
|
|
|
2977
|
-
<
|
|
2978
|
-
<thead>
|
|
2979
|
-
<tr>
|
|
2980
|
-
|
|
2981
|
-
<th>Name</th>
|
|
2982
|
-
|
|
2983
|
-
|
|
2984
|
-
<th>Type</th>
|
|
3198
|
+
<th>Type</th>
|
|
2985
3199
|
|
|
2986
|
-
|
|
3200
|
+
|
|
2987
3201
|
|
|
2988
|
-
|
|
3202
|
+
|
|
2989
3203
|
|
|
2990
|
-
|
|
2991
|
-
|
|
2992
|
-
|
|
3204
|
+
<th class="last">Description</th>
|
|
3205
|
+
</tr>
|
|
3206
|
+
</thead>
|
|
2993
3207
|
|
|
2994
|
-
|
|
2995
|
-
|
|
3208
|
+
<tbody>
|
|
3209
|
+
|
|
2996
3210
|
|
|
2997
|
-
<tr>
|
|
2998
|
-
|
|
2999
|
-
<td class="name"><code>active</code></td>
|
|
3000
3211
|
|
|
3212
|
+
<tr class="deep-level-0">
|
|
3213
|
+
|
|
3214
|
+
<td class="name"><code>active</code></td>
|
|
3215
|
+
|
|
3001
3216
|
|
|
3002
|
-
|
|
3003
|
-
|
|
3004
|
-
|
|
3005
|
-
<
|
|
3217
|
+
<td class="type">
|
|
3218
|
+
|
|
3219
|
+
|
|
3220
|
+
<code class="param-type">boolean</code>
|
|
3006
3221
|
|
|
3007
3222
|
|
|
3008
|
-
|
|
3009
|
-
|
|
3223
|
+
|
|
3224
|
+
</td>
|
|
3010
3225
|
|
|
3011
|
-
|
|
3226
|
+
|
|
3012
3227
|
|
|
3013
|
-
|
|
3228
|
+
|
|
3014
3229
|
|
|
3015
|
-
|
|
3016
|
-
|
|
3230
|
+
<td class="description last"><p>If true, removes all whitespace from header names; if false, only trims edges</p></td>
|
|
3231
|
+
</tr>
|
|
3017
3232
|
|
|
3018
|
-
|
|
3019
|
-
</tbody>
|
|
3020
|
-
</table>
|
|
3021
3233
|
|
|
3234
|
+
|
|
3235
|
+
</tbody>
|
|
3236
|
+
</table>
|
|
3237
|
+
</div>
|
|
3022
3238
|
|
|
3023
3239
|
|
|
3024
3240
|
|
|
@@ -3049,18 +3265,19 @@ When enabled, fields wrapped in double quotes can contain delimiters and newline
|
|
|
3049
3265
|
|
|
3050
3266
|
|
|
3051
3267
|
|
|
3052
|
-
|
|
3053
|
-
|
|
3054
|
-
<dt class="tag-source">Source:</dt>
|
|
3055
|
-
<dd class="tag-source"><ul class="dummy"><li>
|
|
3056
|
-
<a href="src_csvToJson.js.html">src/csvToJson.js</a>, <a href="src_csvToJson.js.html#line62">line 62</a>
|
|
3057
|
-
</li></ul></dd>
|
|
3058
3268
|
|
|
3059
3269
|
|
|
3060
3270
|
|
|
3061
3271
|
|
|
3062
3272
|
|
|
3063
3273
|
|
|
3274
|
+
|
|
3275
|
+
<p class="tag-source">
|
|
3276
|
+
<a href="src_csvToJson.js.html" class="button">View Source</a>
|
|
3277
|
+
<span>
|
|
3278
|
+
<a href="src_csvToJson.js.html">src/csvToJson.js</a>, <a href="src_csvToJson.js.html#line63">line 63</a>
|
|
3279
|
+
</span>
|
|
3280
|
+
</p>
|
|
3064
3281
|
|
|
3065
3282
|
</dl>
|
|
3066
3283
|
|
|
@@ -3078,34 +3295,41 @@ When enabled, fields wrapped in double quotes can contain delimiters and newline
|
|
|
3078
3295
|
|
|
3079
3296
|
|
|
3080
3297
|
|
|
3081
|
-
<h5>Returns:</h5>
|
|
3082
3298
|
|
|
3083
|
-
|
|
3084
|
-
<div class="param-desc">
|
|
3085
|
-
<p>For method chaining</p>
|
|
3086
|
-
</div>
|
|
3087
3299
|
|
|
3088
3300
|
|
|
3301
|
+
<div class='columns method-parameter'>
|
|
3302
|
+
<div class="column is-2"><label>Returns:</label></div>
|
|
3303
|
+
<div class="column is-10">
|
|
3304
|
+
|
|
3305
|
+
|
|
3089
3306
|
|
|
3090
|
-
<
|
|
3091
|
-
|
|
3092
|
-
|
|
3093
|
-
|
|
3094
|
-
|
|
3307
|
+
<div class="columns">
|
|
3308
|
+
|
|
3309
|
+
<div class='param-desc column is-7'><p>For method chaining</p></div>
|
|
3310
|
+
|
|
3311
|
+
|
|
3312
|
+
<div class='column is-5 has-text-left'>
|
|
3313
|
+
<label>Type: </label>
|
|
3095
3314
|
|
|
3096
|
-
<
|
|
3097
|
-
|
|
3315
|
+
<code class="param-type">this</code>
|
|
3098
3316
|
|
|
3099
|
-
</dd>
|
|
3100
|
-
</dl>
|
|
3101
3317
|
|
|
3318
|
+
</div>
|
|
3102
3319
|
|
|
3320
|
+
</div>
|
|
3103
3321
|
|
|
3322
|
+
|
|
3323
|
+
</div>
|
|
3324
|
+
</div>
|
|
3104
3325
|
|
|
3105
3326
|
|
|
3106
3327
|
|
|
3107
3328
|
|
|
3108
|
-
|
|
3329
|
+
</div>
|
|
3330
|
+
|
|
3331
|
+
</div>
|
|
3332
|
+
</div>
|
|
3109
3333
|
|
|
3110
3334
|
|
|
3111
3335
|
|
|
@@ -3118,19 +3342,26 @@ When enabled, fields wrapped in double quotes can contain delimiters and newline
|
|
|
3118
3342
|
|
|
3119
3343
|
|
|
3120
3344
|
|
|
3121
|
-
</div>
|
|
3122
|
-
|
|
3123
|
-
<
|
|
3124
|
-
|
|
3125
|
-
</
|
|
3126
|
-
|
|
3127
|
-
<
|
|
3345
|
+
</div>
|
|
3346
|
+
|
|
3347
|
+
<footer class="footer">
|
|
3348
|
+
<div class="content has-text-centered">
|
|
3349
|
+
<p>Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.5</a></p>
|
|
3350
|
+
<p class="sidebar-created-by">
|
|
3351
|
+
<a href="https://github.com/SoftwareBrothers/better-docs" target="_blank">BetterDocs theme</a> provided with <i class="fas fa-heart"></i> by
|
|
3352
|
+
<a href="http://softwarebrothers.co" target="_blank">SoftwareBrothers - JavaScript Development Agency</a>
|
|
3353
|
+
</p>
|
|
3354
|
+
</div>
|
|
3355
|
+
</footer>
|
|
3356
|
+
|
|
3357
|
+
</div>
|
|
3358
|
+
<div id="side-nav" class="side-nav">
|
|
3359
|
+
</div>
|
|
3360
|
+
</div>
|
|
3361
|
+
<script src="scripts/app.min.js"></script>
|
|
3362
|
+
<script>PR.prettyPrint();</script>
|
|
3363
|
+
<script src="scripts/linenumber.js"> </script>
|
|
3128
3364
|
|
|
3129
|
-
<footer>
|
|
3130
|
-
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.5</a> on Fri Mar 20 2026 16:08:52 GMT+0000 (Coordinated Universal Time)
|
|
3131
|
-
</footer>
|
|
3132
3365
|
|
|
3133
|
-
<script> prettyPrint(); </script>
|
|
3134
|
-
<script src="scripts/linenumber.js"> </script>
|
|
3135
3366
|
</body>
|
|
3136
3367
|
</html>
|