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
|
@@ -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> CsvToJsonAsync</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: CsvToJsonAsync</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>CsvToJsonAsync</h1>
|
|
102
|
+
</header>
|
|
103
|
+
|
|
104
|
+
|
|
24
105
|
|
|
25
106
|
|
|
26
107
|
|
|
@@ -40,25 +121,36 @@ Proxies configuration to sync instance but provides async file I/O methods</p></
|
|
|
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
|
+
|
|
131
|
+
|
|
43
132
|
|
|
44
133
|
|
|
45
|
-
<
|
|
134
|
+
<h4 class="name" id="CsvToJsonAsync">
|
|
135
|
+
<a class="href-link" href="#CsvToJsonAsync">#</a>
|
|
136
|
+
|
|
137
|
+
<span class="code-name">
|
|
138
|
+
|
|
139
|
+
new CsvToJsonAsync<span class="signature">()</span><span class="type-signature"></span>
|
|
140
|
+
|
|
141
|
+
</span>
|
|
142
|
+
</h4>
|
|
46
143
|
|
|
47
144
|
|
|
48
145
|
|
|
49
|
-
<h4 class="name" id="CsvToJsonAsync"><span class="type-signature"></span>new CsvToJsonAsync<span class="signature">()</span><span class="type-signature"></span></h4>
|
|
50
146
|
|
|
51
|
-
|
|
147
|
+
<div class="description">
|
|
148
|
+
<p>Constructor initializes proxy to sync csvToJson instance</p>
|
|
149
|
+
</div>
|
|
52
150
|
|
|
53
151
|
|
|
54
152
|
|
|
55
153
|
|
|
56
|
-
<div class="description">
|
|
57
|
-
<p>Constructor initializes proxy to sync csvToJson instance</p>
|
|
58
|
-
</div>
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
154
|
|
|
63
155
|
|
|
64
156
|
|
|
@@ -94,18 +186,19 @@ Proxies configuration to sync instance but provides async file I/O methods</p></
|
|
|
94
186
|
|
|
95
187
|
|
|
96
188
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
<dt class="tag-source">Source:</dt>
|
|
100
|
-
<dd class="tag-source"><ul class="dummy"><li>
|
|
101
|
-
<a href="src_csvToJsonAsync.js.html">src/csvToJsonAsync.js</a>, <a href="src_csvToJsonAsync.js.html#line12">line 12</a>
|
|
102
|
-
</li></ul></dd>
|
|
103
189
|
|
|
104
190
|
|
|
105
191
|
|
|
106
192
|
|
|
107
193
|
|
|
108
194
|
|
|
195
|
+
|
|
196
|
+
<p class="tag-source">
|
|
197
|
+
<a href="src_csvToJsonAsync.js.html" class="button">View Source</a>
|
|
198
|
+
<span>
|
|
199
|
+
<a href="src_csvToJsonAsync.js.html">src/csvToJsonAsync.js</a>, <a href="src_csvToJsonAsync.js.html#line13">line 13</a>
|
|
200
|
+
</span>
|
|
201
|
+
</p>
|
|
109
202
|
|
|
110
203
|
</dl>
|
|
111
204
|
|
|
@@ -128,9 +221,15 @@ Proxies configuration to sync instance but provides async file I/O methods</p></
|
|
|
128
221
|
|
|
129
222
|
|
|
130
223
|
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
</div>
|
|
227
|
+
</div>
|
|
228
|
+
</div>
|
|
229
|
+
|
|
131
230
|
|
|
132
231
|
</div>
|
|
133
|
-
|
|
232
|
+
|
|
134
233
|
|
|
135
234
|
|
|
136
235
|
|
|
@@ -146,27 +245,34 @@ Proxies configuration to sync instance but provides async file I/O methods</p></
|
|
|
146
245
|
|
|
147
246
|
|
|
148
247
|
|
|
149
|
-
<
|
|
248
|
+
<div class='vertical-section'>
|
|
249
|
+
<h1>Methods</h1>
|
|
250
|
+
<div class="members">
|
|
251
|
+
|
|
252
|
+
<div class="member">
|
|
150
253
|
|
|
254
|
+
|
|
255
|
+
|
|
256
|
+
<h4 class="name" id="csvStringToJsonAsync">
|
|
257
|
+
<a class="href-link" href="#csvStringToJsonAsync">#</a>
|
|
151
258
|
|
|
259
|
+
<span class="code-name">
|
|
152
260
|
|
|
153
|
-
|
|
261
|
+
csvStringToJsonAsync<span class="signature">(csvString, options)</span><span class="type-signature"> → {Promise.<Array.<object>>}</span>
|
|
262
|
+
|
|
263
|
+
</span>
|
|
264
|
+
</h4>
|
|
154
265
|
|
|
155
266
|
|
|
156
267
|
|
|
157
|
-
<h4 class="name" id="csvStringToJsonAsync"><span class="type-signature"></span>csvStringToJsonAsync<span class="signature">(csvString, options)</span><span class="type-signature"> → {Promise.<Array.<object>>}</span></h4>
|
|
158
268
|
|
|
159
|
-
|
|
269
|
+
<div class="description">
|
|
270
|
+
<p>Parse CSV string to JSON array (async)</p>
|
|
271
|
+
</div>
|
|
160
272
|
|
|
161
273
|
|
|
162
274
|
|
|
163
275
|
|
|
164
|
-
<div class="description">
|
|
165
|
-
<p>Parse CSV string to JSON array (async)</p>
|
|
166
|
-
</div>
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
276
|
|
|
171
277
|
|
|
172
278
|
|
|
@@ -175,76 +281,80 @@ Proxies configuration to sync instance but provides async file I/O methods</p></
|
|
|
175
281
|
|
|
176
282
|
<h5>Parameters:</h5>
|
|
177
283
|
|
|
284
|
+
<div class="table-container">
|
|
285
|
+
<table class="params table">
|
|
286
|
+
<thead>
|
|
287
|
+
<tr>
|
|
288
|
+
|
|
289
|
+
<th>Name</th>
|
|
290
|
+
|
|
178
291
|
|
|
179
|
-
<
|
|
180
|
-
<thead>
|
|
181
|
-
<tr>
|
|
182
|
-
|
|
183
|
-
<th>Name</th>
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
<th>Type</th>
|
|
292
|
+
<th>Type</th>
|
|
187
293
|
|
|
188
|
-
|
|
294
|
+
|
|
189
295
|
|
|
190
|
-
|
|
296
|
+
|
|
191
297
|
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
298
|
+
<th class="last">Description</th>
|
|
299
|
+
</tr>
|
|
300
|
+
</thead>
|
|
195
301
|
|
|
196
|
-
|
|
197
|
-
|
|
302
|
+
<tbody>
|
|
303
|
+
|
|
198
304
|
|
|
199
|
-
<tr>
|
|
200
|
-
|
|
201
|
-
<td class="name"><code>csvString</code></td>
|
|
202
305
|
|
|
306
|
+
<tr class="deep-level-0">
|
|
307
|
+
|
|
308
|
+
<td class="name"><code>csvString</code></td>
|
|
309
|
+
|
|
203
310
|
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
<
|
|
311
|
+
<td class="type">
|
|
312
|
+
|
|
313
|
+
|
|
314
|
+
<code class="param-type">string</code>
|
|
208
315
|
|
|
209
316
|
|
|
210
|
-
|
|
211
|
-
|
|
317
|
+
|
|
318
|
+
</td>
|
|
212
319
|
|
|
213
|
-
|
|
320
|
+
|
|
214
321
|
|
|
215
|
-
|
|
322
|
+
|
|
216
323
|
|
|
217
|
-
|
|
218
|
-
|
|
324
|
+
<td class="description last"><p>CSV content as string</p></td>
|
|
325
|
+
</tr>
|
|
219
326
|
|
|
220
|
-
|
|
221
327
|
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
<td class="name"><code>options</code></td>
|
|
225
|
-
|
|
328
|
+
|
|
226
329
|
|
|
227
|
-
<td class="type">
|
|
228
330
|
|
|
229
|
-
|
|
230
|
-
|
|
331
|
+
<tr class="deep-level-0">
|
|
332
|
+
|
|
333
|
+
<td class="name"><code>options</code></td>
|
|
334
|
+
|
|
231
335
|
|
|
336
|
+
<td class="type">
|
|
337
|
+
|
|
338
|
+
|
|
339
|
+
<code class="param-type">object</code>
|
|
232
340
|
|
|
233
|
-
|
|
234
|
-
</td>
|
|
235
341
|
|
|
236
|
-
|
|
342
|
+
|
|
343
|
+
</td>
|
|
237
344
|
|
|
238
|
-
|
|
345
|
+
|
|
239
346
|
|
|
240
|
-
|
|
241
|
-
</tr>
|
|
347
|
+
|
|
242
348
|
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
</table>
|
|
349
|
+
<td class="description last"><p>Configuration options (default: { raw: true })</p></td>
|
|
350
|
+
</tr>
|
|
246
351
|
|
|
247
352
|
|
|
353
|
+
|
|
354
|
+
</tbody>
|
|
355
|
+
</table>
|
|
356
|
+
</div>
|
|
357
|
+
|
|
248
358
|
|
|
249
359
|
|
|
250
360
|
|
|
@@ -274,18 +384,19 @@ Proxies configuration to sync instance but provides async file I/O methods</p></
|
|
|
274
384
|
|
|
275
385
|
|
|
276
386
|
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
<dt class="tag-source">Source:</dt>
|
|
280
|
-
<dd class="tag-source"><ul class="dummy"><li>
|
|
281
|
-
<a href="src_csvToJsonAsync.js.html">src/csvToJsonAsync.js</a>, <a href="src_csvToJsonAsync.js.html#line174">line 174</a>
|
|
282
|
-
</li></ul></dd>
|
|
283
387
|
|
|
284
388
|
|
|
285
389
|
|
|
286
390
|
|
|
287
391
|
|
|
288
392
|
|
|
393
|
+
|
|
394
|
+
<p class="tag-source">
|
|
395
|
+
<a href="src_csvToJsonAsync.js.html" class="button">View Source</a>
|
|
396
|
+
<span>
|
|
397
|
+
<a href="src_csvToJsonAsync.js.html">src/csvToJsonAsync.js</a>, <a href="src_csvToJsonAsync.js.html#line175">line 175</a>
|
|
398
|
+
</span>
|
|
399
|
+
</p>
|
|
289
400
|
|
|
290
401
|
</dl>
|
|
291
402
|
|
|
@@ -301,90 +412,99 @@ Proxies configuration to sync instance but provides async file I/O methods</p></
|
|
|
301
412
|
|
|
302
413
|
|
|
303
414
|
|
|
304
|
-
<h5>Throws:</h5>
|
|
305
415
|
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
<dl>
|
|
309
|
-
<dt>
|
|
310
|
-
<div class="param-desc">
|
|
311
|
-
<p>If CSV is malformed</p>
|
|
312
|
-
</div>
|
|
313
|
-
</dt>
|
|
314
|
-
<dd></dd>
|
|
315
|
-
<dt>
|
|
316
|
-
<dl>
|
|
317
|
-
<dt>
|
|
318
|
-
Type
|
|
319
|
-
</dt>
|
|
320
|
-
<dd>
|
|
321
|
-
|
|
322
|
-
<span class="param-type"><a href="CsvFormatError.html">CsvFormatError</a></span>
|
|
323
416
|
|
|
324
417
|
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
418
|
+
<div class='columns method-parameter'>
|
|
419
|
+
<div class="column is-2"><label>Throws:</label></div>
|
|
420
|
+
<div class="column is-10">
|
|
421
|
+
|
|
422
|
+
|
|
423
|
+
<div class="columns">
|
|
424
|
+
|
|
425
|
+
<div class='param-desc column is-7'><p>If CSV is malformed</p></div>
|
|
426
|
+
<div class='column is-5 has-text-left'>
|
|
427
|
+
<label>Type: </label>
|
|
428
|
+
<code class="param-type"><a href="CsvFormatError.html">CsvFormatError</a></code>
|
|
330
429
|
|
|
331
430
|
|
|
431
|
+
</div>
|
|
332
432
|
|
|
433
|
+
</div>
|
|
333
434
|
|
|
435
|
+
|
|
436
|
+
</div>
|
|
437
|
+
</div>
|
|
334
438
|
|
|
335
|
-
<h5>Returns:</h5>
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
<div class="param-desc">
|
|
339
|
-
<p>Array of objects representing CSV rows</p>
|
|
340
|
-
</div>
|
|
341
439
|
|
|
342
440
|
|
|
441
|
+
<div class='columns method-parameter'>
|
|
442
|
+
<div class="column is-2"><label>Returns:</label></div>
|
|
443
|
+
<div class="column is-10">
|
|
444
|
+
|
|
445
|
+
|
|
343
446
|
|
|
344
|
-
<
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
447
|
+
<div class="columns">
|
|
448
|
+
|
|
449
|
+
<div class='param-desc column is-7'><p>Array of objects representing CSV rows</p></div>
|
|
450
|
+
|
|
451
|
+
|
|
452
|
+
<div class='column is-5 has-text-left'>
|
|
453
|
+
<label>Type: </label>
|
|
349
454
|
|
|
350
|
-
<
|
|
351
|
-
|
|
455
|
+
<code class="param-type">Promise.<Array.<object>></code>
|
|
352
456
|
|
|
353
|
-
</dd>
|
|
354
|
-
</dl>
|
|
355
457
|
|
|
458
|
+
</div>
|
|
356
459
|
|
|
460
|
+
</div>
|
|
461
|
+
|
|
462
|
+
|
|
463
|
+
</div>
|
|
464
|
+
</div>
|
|
357
465
|
|
|
358
466
|
|
|
359
467
|
|
|
360
468
|
|
|
361
469
|
<h5>Example</h5>
|
|
362
470
|
|
|
363
|
-
|
|
471
|
+
|
|
472
|
+
<pre class="prettyprint"><code>const csvToJson = require('convert-csv-to-json');
|
|
364
473
|
const data = await csvToJson.csvStringToJsonAsync('name,age\nAlice,30');
|
|
365
474
|
console.log(data);</code></pre>
|
|
475
|
+
|
|
476
|
+
|
|
366
477
|
|
|
478
|
+
</div>
|
|
479
|
+
|
|
480
|
+
<div class="member">
|
|
367
481
|
|
|
368
482
|
|
|
483
|
+
|
|
484
|
+
<h4 class="name" id="csvStringToJsonStringifiedAsync">
|
|
485
|
+
<a class="href-link" href="#csvStringToJsonStringifiedAsync">#</a>
|
|
369
486
|
|
|
370
487
|
|
|
371
|
-
|
|
488
|
+
<span class='tag'>async</span>
|
|
489
|
+
|
|
490
|
+
|
|
491
|
+
<span class="code-name">
|
|
492
|
+
|
|
493
|
+
csvStringToJsonStringifiedAsync<span class="signature">(csvString)</span><span class="type-signature"> → {Promise.<string>}</span>
|
|
494
|
+
|
|
495
|
+
</span>
|
|
496
|
+
</h4>
|
|
372
497
|
|
|
373
498
|
|
|
374
499
|
|
|
375
|
-
<h4 class="name" id="csvStringToJsonStringifiedAsync"><span class="type-signature">(async) </span>csvStringToJsonStringifiedAsync<span class="signature">(csvString)</span><span class="type-signature"> → {Promise.<string>}</span></h4>
|
|
376
500
|
|
|
377
|
-
|
|
501
|
+
<div class="description">
|
|
502
|
+
<p>Parse CSV string to stringified JSON (async)</p>
|
|
503
|
+
</div>
|
|
378
504
|
|
|
379
505
|
|
|
380
506
|
|
|
381
507
|
|
|
382
|
-
<div class="description">
|
|
383
|
-
<p>Parse CSV string to stringified JSON (async)</p>
|
|
384
|
-
</div>
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
508
|
|
|
389
509
|
|
|
390
510
|
|
|
@@ -393,52 +513,54 @@ console.log(data);</code></pre>
|
|
|
393
513
|
|
|
394
514
|
<h5>Parameters:</h5>
|
|
395
515
|
|
|
516
|
+
<div class="table-container">
|
|
517
|
+
<table class="params table">
|
|
518
|
+
<thead>
|
|
519
|
+
<tr>
|
|
520
|
+
|
|
521
|
+
<th>Name</th>
|
|
522
|
+
|
|
396
523
|
|
|
397
|
-
<
|
|
398
|
-
<thead>
|
|
399
|
-
<tr>
|
|
400
|
-
|
|
401
|
-
<th>Name</th>
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
<th>Type</th>
|
|
524
|
+
<th>Type</th>
|
|
405
525
|
|
|
406
|
-
|
|
526
|
+
|
|
407
527
|
|
|
408
|
-
|
|
528
|
+
|
|
409
529
|
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
530
|
+
<th class="last">Description</th>
|
|
531
|
+
</tr>
|
|
532
|
+
</thead>
|
|
413
533
|
|
|
414
|
-
|
|
415
|
-
|
|
534
|
+
<tbody>
|
|
535
|
+
|
|
416
536
|
|
|
417
|
-
<tr>
|
|
418
|
-
|
|
419
|
-
<td class="name"><code>csvString</code></td>
|
|
420
537
|
|
|
538
|
+
<tr class="deep-level-0">
|
|
539
|
+
|
|
540
|
+
<td class="name"><code>csvString</code></td>
|
|
541
|
+
|
|
421
542
|
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
<
|
|
543
|
+
<td class="type">
|
|
544
|
+
|
|
545
|
+
|
|
546
|
+
<code class="param-type">string</code>
|
|
426
547
|
|
|
427
548
|
|
|
428
|
-
|
|
429
|
-
|
|
549
|
+
|
|
550
|
+
</td>
|
|
430
551
|
|
|
431
|
-
|
|
552
|
+
|
|
432
553
|
|
|
433
|
-
|
|
554
|
+
|
|
434
555
|
|
|
435
|
-
|
|
436
|
-
|
|
556
|
+
<td class="description last"><p>CSV content as string</p></td>
|
|
557
|
+
</tr>
|
|
437
558
|
|
|
438
|
-
|
|
439
|
-
</tbody>
|
|
440
|
-
</table>
|
|
441
559
|
|
|
560
|
+
|
|
561
|
+
</tbody>
|
|
562
|
+
</table>
|
|
563
|
+
</div>
|
|
442
564
|
|
|
443
565
|
|
|
444
566
|
|
|
@@ -469,18 +591,19 @@ console.log(data);</code></pre>
|
|
|
469
591
|
|
|
470
592
|
|
|
471
593
|
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
<dt class="tag-source">Source:</dt>
|
|
475
|
-
<dd class="tag-source"><ul class="dummy"><li>
|
|
476
|
-
<a href="src_csvToJsonAsync.js.html">src/csvToJsonAsync.js</a>, <a href="src_csvToJsonAsync.js.html#line188">line 188</a>
|
|
477
|
-
</li></ul></dd>
|
|
478
594
|
|
|
479
595
|
|
|
480
596
|
|
|
481
597
|
|
|
482
598
|
|
|
483
599
|
|
|
600
|
+
|
|
601
|
+
<p class="tag-source">
|
|
602
|
+
<a href="src_csvToJsonAsync.js.html" class="button">View Source</a>
|
|
603
|
+
<span>
|
|
604
|
+
<a href="src_csvToJsonAsync.js.html">src/csvToJsonAsync.js</a>, <a href="src_csvToJsonAsync.js.html#line189">line 189</a>
|
|
605
|
+
</span>
|
|
606
|
+
</p>
|
|
484
607
|
|
|
485
608
|
</dl>
|
|
486
609
|
|
|
@@ -496,90 +619,95 @@ console.log(data);</code></pre>
|
|
|
496
619
|
|
|
497
620
|
|
|
498
621
|
|
|
499
|
-
<h5>Throws:</h5>
|
|
500
|
-
|
|
501
|
-
|
|
502
622
|
|
|
503
|
-
<dl>
|
|
504
|
-
<dt>
|
|
505
|
-
<div class="param-desc">
|
|
506
|
-
<p>If CSV is malformed</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="CsvFormatError.html">CsvFormatError</a></span>
|
|
518
623
|
|
|
519
624
|
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
625
|
+
<div class='columns method-parameter'>
|
|
626
|
+
<div class="column is-2"><label>Throws:</label></div>
|
|
627
|
+
<div class="column is-10">
|
|
628
|
+
|
|
629
|
+
|
|
630
|
+
<div class="columns">
|
|
631
|
+
|
|
632
|
+
<div class='param-desc column is-7'><p>If CSV is malformed</p></div>
|
|
633
|
+
<div class='column is-5 has-text-left'>
|
|
634
|
+
<label>Type: </label>
|
|
635
|
+
<code class="param-type"><a href="CsvFormatError.html">CsvFormatError</a></code>
|
|
525
636
|
|
|
526
637
|
|
|
638
|
+
</div>
|
|
527
639
|
|
|
640
|
+
</div>
|
|
528
641
|
|
|
642
|
+
|
|
643
|
+
</div>
|
|
644
|
+
</div>
|
|
529
645
|
|
|
530
|
-
<h5>Returns:</h5>
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
<div class="param-desc">
|
|
534
|
-
<p>JSON stringified array of objects</p>
|
|
535
|
-
</div>
|
|
536
646
|
|
|
537
647
|
|
|
648
|
+
<div class='columns method-parameter'>
|
|
649
|
+
<div class="column is-2"><label>Returns:</label></div>
|
|
650
|
+
<div class="column is-10">
|
|
651
|
+
|
|
652
|
+
|
|
538
653
|
|
|
539
|
-
<
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
654
|
+
<div class="columns">
|
|
655
|
+
|
|
656
|
+
<div class='param-desc column is-7'><p>JSON stringified array of objects</p></div>
|
|
657
|
+
|
|
658
|
+
|
|
659
|
+
<div class='column is-5 has-text-left'>
|
|
660
|
+
<label>Type: </label>
|
|
544
661
|
|
|
545
|
-
<
|
|
662
|
+
<code class="param-type">Promise.<string></code>
|
|
546
663
|
|
|
547
664
|
|
|
548
|
-
</
|
|
549
|
-
</dl>
|
|
550
|
-
|
|
665
|
+
</div>
|
|
551
666
|
|
|
667
|
+
</div>
|
|
668
|
+
|
|
669
|
+
|
|
670
|
+
</div>
|
|
671
|
+
</div>
|
|
552
672
|
|
|
553
673
|
|
|
554
674
|
|
|
555
675
|
|
|
556
676
|
<h5>Example</h5>
|
|
557
677
|
|
|
558
|
-
|
|
678
|
+
|
|
679
|
+
<pre class="prettyprint"><code>const csvToJson = require('convert-csv-to-json');
|
|
559
680
|
const jsonString = await csvToJson.csvStringToJsonStringifiedAsync('name,age\nAlice,30');
|
|
560
681
|
console.log(jsonString);</code></pre>
|
|
682
|
+
|
|
561
683
|
|
|
562
684
|
|
|
685
|
+
</div>
|
|
686
|
+
|
|
687
|
+
<div class="member">
|
|
563
688
|
|
|
689
|
+
|
|
690
|
+
|
|
691
|
+
<h4 class="name" id="encoding">
|
|
692
|
+
<a class="href-link" href="#encoding">#</a>
|
|
564
693
|
|
|
694
|
+
<span class="code-name">
|
|
565
695
|
|
|
566
|
-
|
|
696
|
+
encoding<span class="signature">(encoding)</span><span class="type-signature"> → {this}</span>
|
|
697
|
+
|
|
698
|
+
</span>
|
|
699
|
+
</h4>
|
|
567
700
|
|
|
568
701
|
|
|
569
702
|
|
|
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
703
|
|
|
572
|
-
|
|
704
|
+
<div class="description">
|
|
705
|
+
<p>Set file encoding for reading CSV files</p>
|
|
706
|
+
</div>
|
|
573
707
|
|
|
574
708
|
|
|
575
709
|
|
|
576
710
|
|
|
577
|
-
<div class="description">
|
|
578
|
-
<p>Set file encoding for reading CSV files</p>
|
|
579
|
-
</div>
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
711
|
|
|
584
712
|
|
|
585
713
|
|
|
@@ -588,52 +716,54 @@ console.log(jsonString);</code></pre>
|
|
|
588
716
|
|
|
589
717
|
<h5>Parameters:</h5>
|
|
590
718
|
|
|
719
|
+
<div class="table-container">
|
|
720
|
+
<table class="params table">
|
|
721
|
+
<thead>
|
|
722
|
+
<tr>
|
|
723
|
+
|
|
724
|
+
<th>Name</th>
|
|
725
|
+
|
|
591
726
|
|
|
592
|
-
<
|
|
593
|
-
<thead>
|
|
594
|
-
<tr>
|
|
595
|
-
|
|
596
|
-
<th>Name</th>
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
<th>Type</th>
|
|
727
|
+
<th>Type</th>
|
|
600
728
|
|
|
601
|
-
|
|
729
|
+
|
|
602
730
|
|
|
603
|
-
|
|
731
|
+
|
|
604
732
|
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
733
|
+
<th class="last">Description</th>
|
|
734
|
+
</tr>
|
|
735
|
+
</thead>
|
|
608
736
|
|
|
609
|
-
|
|
610
|
-
|
|
737
|
+
<tbody>
|
|
738
|
+
|
|
611
739
|
|
|
612
|
-
<tr>
|
|
613
|
-
|
|
614
|
-
<td class="name"><code>encoding</code></td>
|
|
615
740
|
|
|
741
|
+
<tr class="deep-level-0">
|
|
742
|
+
|
|
743
|
+
<td class="name"><code>encoding</code></td>
|
|
744
|
+
|
|
616
745
|
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
<
|
|
746
|
+
<td class="type">
|
|
747
|
+
|
|
748
|
+
|
|
749
|
+
<code class="param-type">string</code>
|
|
621
750
|
|
|
622
751
|
|
|
623
|
-
|
|
624
|
-
|
|
752
|
+
|
|
753
|
+
</td>
|
|
625
754
|
|
|
626
|
-
|
|
755
|
+
|
|
627
756
|
|
|
628
|
-
|
|
757
|
+
|
|
629
758
|
|
|
630
|
-
|
|
631
|
-
|
|
759
|
+
<td class="description last"><p>Node.js supported encoding (e.g., 'utf8', 'latin1')</p></td>
|
|
760
|
+
</tr>
|
|
632
761
|
|
|
633
|
-
|
|
634
|
-
</tbody>
|
|
635
|
-
</table>
|
|
636
762
|
|
|
763
|
+
|
|
764
|
+
</tbody>
|
|
765
|
+
</table>
|
|
766
|
+
</div>
|
|
637
767
|
|
|
638
768
|
|
|
639
769
|
|
|
@@ -664,18 +794,19 @@ console.log(jsonString);</code></pre>
|
|
|
664
794
|
|
|
665
795
|
|
|
666
796
|
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
<dt class="tag-source">Source:</dt>
|
|
670
|
-
<dd class="tag-source"><ul class="dummy"><li>
|
|
671
|
-
<a href="src_csvToJsonAsync.js.html">src/csvToJsonAsync.js</a>, <a href="src_csvToJsonAsync.js.html#line97">line 97</a>
|
|
672
|
-
</li></ul></dd>
|
|
673
797
|
|
|
674
798
|
|
|
675
799
|
|
|
676
800
|
|
|
677
801
|
|
|
678
802
|
|
|
803
|
+
|
|
804
|
+
<p class="tag-source">
|
|
805
|
+
<a href="src_csvToJsonAsync.js.html" class="button">View Source</a>
|
|
806
|
+
<span>
|
|
807
|
+
<a href="src_csvToJsonAsync.js.html">src/csvToJsonAsync.js</a>, <a href="src_csvToJsonAsync.js.html#line98">line 98</a>
|
|
808
|
+
</span>
|
|
809
|
+
</p>
|
|
679
810
|
|
|
680
811
|
</dl>
|
|
681
812
|
|
|
@@ -693,49 +824,60 @@ console.log(jsonString);</code></pre>
|
|
|
693
824
|
|
|
694
825
|
|
|
695
826
|
|
|
696
|
-
<h5>Returns:</h5>
|
|
697
827
|
|
|
698
|
-
|
|
699
|
-
<div class="param-desc">
|
|
700
|
-
<p>For method chaining</p>
|
|
701
|
-
</div>
|
|
702
828
|
|
|
703
829
|
|
|
830
|
+
<div class='columns method-parameter'>
|
|
831
|
+
<div class="column is-2"><label>Returns:</label></div>
|
|
832
|
+
<div class="column is-10">
|
|
833
|
+
|
|
834
|
+
|
|
704
835
|
|
|
705
|
-
<
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
836
|
+
<div class="columns">
|
|
837
|
+
|
|
838
|
+
<div class='param-desc column is-7'><p>For method chaining</p></div>
|
|
839
|
+
|
|
840
|
+
|
|
841
|
+
<div class='column is-5 has-text-left'>
|
|
842
|
+
<label>Type: </label>
|
|
710
843
|
|
|
711
|
-
<
|
|
712
|
-
|
|
844
|
+
<code class="param-type">this</code>
|
|
713
845
|
|
|
714
|
-
</dd>
|
|
715
|
-
</dl>
|
|
716
846
|
|
|
847
|
+
</div>
|
|
717
848
|
|
|
849
|
+
</div>
|
|
718
850
|
|
|
851
|
+
|
|
852
|
+
</div>
|
|
853
|
+
</div>
|
|
719
854
|
|
|
720
855
|
|
|
721
856
|
|
|
722
857
|
|
|
723
|
-
|
|
858
|
+
</div>
|
|
724
859
|
|
|
860
|
+
<div class="member">
|
|
725
861
|
|
|
726
|
-
|
|
727
862
|
|
|
728
863
|
|
|
729
|
-
<h4 class="name" id="fieldDelimiter"
|
|
864
|
+
<h4 class="name" id="fieldDelimiter">
|
|
865
|
+
<a class="href-link" href="#fieldDelimiter">#</a>
|
|
866
|
+
|
|
867
|
+
<span class="code-name">
|
|
868
|
+
|
|
869
|
+
fieldDelimiter<span class="signature">(delimiter)</span><span class="type-signature"> → {this}</span>
|
|
870
|
+
|
|
871
|
+
</span>
|
|
872
|
+
</h4>
|
|
730
873
|
|
|
731
874
|
|
|
732
875
|
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
</div>
|
|
876
|
+
|
|
877
|
+
<div class="description">
|
|
878
|
+
<p>Set the field delimiter character</p>
|
|
879
|
+
</div>
|
|
880
|
+
|
|
739
881
|
|
|
740
882
|
|
|
741
883
|
|
|
@@ -747,52 +889,54 @@ console.log(jsonString);</code></pre>
|
|
|
747
889
|
|
|
748
890
|
<h5>Parameters:</h5>
|
|
749
891
|
|
|
892
|
+
<div class="table-container">
|
|
893
|
+
<table class="params table">
|
|
894
|
+
<thead>
|
|
895
|
+
<tr>
|
|
896
|
+
|
|
897
|
+
<th>Name</th>
|
|
898
|
+
|
|
750
899
|
|
|
751
|
-
<
|
|
752
|
-
<thead>
|
|
753
|
-
<tr>
|
|
754
|
-
|
|
755
|
-
<th>Name</th>
|
|
756
|
-
|
|
900
|
+
<th>Type</th>
|
|
757
901
|
|
|
758
|
-
|
|
902
|
+
|
|
759
903
|
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
904
|
+
|
|
763
905
|
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
906
|
+
<th class="last">Description</th>
|
|
907
|
+
</tr>
|
|
908
|
+
</thead>
|
|
767
909
|
|
|
768
|
-
|
|
769
|
-
|
|
910
|
+
<tbody>
|
|
911
|
+
|
|
770
912
|
|
|
771
|
-
<tr>
|
|
772
|
-
|
|
773
|
-
<td class="name"><code>delimiter</code></td>
|
|
774
913
|
|
|
914
|
+
<tr class="deep-level-0">
|
|
915
|
+
|
|
916
|
+
<td class="name"><code>delimiter</code></td>
|
|
917
|
+
|
|
775
918
|
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
<
|
|
919
|
+
<td class="type">
|
|
920
|
+
|
|
921
|
+
|
|
922
|
+
<code class="param-type">string</code>
|
|
780
923
|
|
|
781
924
|
|
|
782
|
-
|
|
783
|
-
|
|
925
|
+
|
|
926
|
+
</td>
|
|
784
927
|
|
|
785
|
-
|
|
928
|
+
|
|
786
929
|
|
|
787
|
-
|
|
930
|
+
|
|
788
931
|
|
|
789
|
-
|
|
790
|
-
|
|
932
|
+
<td class="description last"><p>Character(s) to use as field separator</p></td>
|
|
933
|
+
</tr>
|
|
791
934
|
|
|
792
|
-
|
|
793
|
-
</tbody>
|
|
794
|
-
</table>
|
|
795
935
|
|
|
936
|
+
|
|
937
|
+
</tbody>
|
|
938
|
+
</table>
|
|
939
|
+
</div>
|
|
796
940
|
|
|
797
941
|
|
|
798
942
|
|
|
@@ -823,18 +967,19 @@ console.log(jsonString);</code></pre>
|
|
|
823
967
|
|
|
824
968
|
|
|
825
969
|
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
<dt class="tag-source">Source:</dt>
|
|
829
|
-
<dd class="tag-source"><ul class="dummy"><li>
|
|
830
|
-
<a href="src_csvToJsonAsync.js.html">src/csvToJsonAsync.js</a>, <a href="src_csvToJsonAsync.js.html#line46">line 46</a>
|
|
831
|
-
</li></ul></dd>
|
|
832
970
|
|
|
833
971
|
|
|
834
972
|
|
|
835
973
|
|
|
836
974
|
|
|
837
975
|
|
|
976
|
+
|
|
977
|
+
<p class="tag-source">
|
|
978
|
+
<a href="src_csvToJsonAsync.js.html" class="button">View Source</a>
|
|
979
|
+
<span>
|
|
980
|
+
<a href="src_csvToJsonAsync.js.html">src/csvToJsonAsync.js</a>, <a href="src_csvToJsonAsync.js.html#line47">line 47</a>
|
|
981
|
+
</span>
|
|
982
|
+
</p>
|
|
838
983
|
|
|
839
984
|
</dl>
|
|
840
985
|
|
|
@@ -852,49 +997,60 @@ console.log(jsonString);</code></pre>
|
|
|
852
997
|
|
|
853
998
|
|
|
854
999
|
|
|
855
|
-
<h5>Returns:</h5>
|
|
856
1000
|
|
|
857
|
-
|
|
858
|
-
<div class="param-desc">
|
|
859
|
-
<p>For method chaining</p>
|
|
860
|
-
</div>
|
|
861
1001
|
|
|
862
1002
|
|
|
1003
|
+
<div class='columns method-parameter'>
|
|
1004
|
+
<div class="column is-2"><label>Returns:</label></div>
|
|
1005
|
+
<div class="column is-10">
|
|
1006
|
+
|
|
1007
|
+
|
|
863
1008
|
|
|
864
|
-
<
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
1009
|
+
<div class="columns">
|
|
1010
|
+
|
|
1011
|
+
<div class='param-desc column is-7'><p>For method chaining</p></div>
|
|
1012
|
+
|
|
1013
|
+
|
|
1014
|
+
<div class='column is-5 has-text-left'>
|
|
1015
|
+
<label>Type: </label>
|
|
869
1016
|
|
|
870
|
-
<
|
|
1017
|
+
<code class="param-type">this</code>
|
|
871
1018
|
|
|
872
1019
|
|
|
873
|
-
</
|
|
874
|
-
</dl>
|
|
875
|
-
|
|
1020
|
+
</div>
|
|
876
1021
|
|
|
1022
|
+
</div>
|
|
877
1023
|
|
|
1024
|
+
|
|
1025
|
+
</div>
|
|
1026
|
+
</div>
|
|
878
1027
|
|
|
879
1028
|
|
|
880
1029
|
|
|
881
1030
|
|
|
882
|
-
|
|
1031
|
+
</div>
|
|
883
1032
|
|
|
1033
|
+
<div class="member">
|
|
884
1034
|
|
|
885
|
-
|
|
886
1035
|
|
|
887
1036
|
|
|
888
|
-
<h4 class="name" id="formatValueByType"
|
|
1037
|
+
<h4 class="name" id="formatValueByType">
|
|
1038
|
+
<a class="href-link" href="#formatValueByType">#</a>
|
|
1039
|
+
|
|
1040
|
+
<span class="code-name">
|
|
1041
|
+
|
|
1042
|
+
formatValueByType<span class="signature">(active)</span><span class="type-signature"> → {this}</span>
|
|
1043
|
+
|
|
1044
|
+
</span>
|
|
1045
|
+
</h4>
|
|
889
1046
|
|
|
890
1047
|
|
|
891
1048
|
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
</div>
|
|
1049
|
+
|
|
1050
|
+
<div class="description">
|
|
1051
|
+
<p>Enable or disable automatic type formatting for values</p>
|
|
1052
|
+
</div>
|
|
1053
|
+
|
|
898
1054
|
|
|
899
1055
|
|
|
900
1056
|
|
|
@@ -906,52 +1062,54 @@ console.log(jsonString);</code></pre>
|
|
|
906
1062
|
|
|
907
1063
|
<h5>Parameters:</h5>
|
|
908
1064
|
|
|
1065
|
+
<div class="table-container">
|
|
1066
|
+
<table class="params table">
|
|
1067
|
+
<thead>
|
|
1068
|
+
<tr>
|
|
1069
|
+
|
|
1070
|
+
<th>Name</th>
|
|
1071
|
+
|
|
909
1072
|
|
|
910
|
-
<
|
|
911
|
-
<thead>
|
|
912
|
-
<tr>
|
|
913
|
-
|
|
914
|
-
<th>Name</th>
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
<th>Type</th>
|
|
1073
|
+
<th>Type</th>
|
|
918
1074
|
|
|
919
|
-
|
|
1075
|
+
|
|
920
1076
|
|
|
921
|
-
|
|
1077
|
+
|
|
922
1078
|
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
1079
|
+
<th class="last">Description</th>
|
|
1080
|
+
</tr>
|
|
1081
|
+
</thead>
|
|
926
1082
|
|
|
927
|
-
|
|
928
|
-
|
|
1083
|
+
<tbody>
|
|
1084
|
+
|
|
929
1085
|
|
|
930
|
-
<tr>
|
|
931
|
-
|
|
932
|
-
<td class="name"><code>active</code></td>
|
|
933
1086
|
|
|
1087
|
+
<tr class="deep-level-0">
|
|
1088
|
+
|
|
1089
|
+
<td class="name"><code>active</code></td>
|
|
1090
|
+
|
|
934
1091
|
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
<
|
|
1092
|
+
<td class="type">
|
|
1093
|
+
|
|
1094
|
+
|
|
1095
|
+
<code class="param-type">boolean</code>
|
|
939
1096
|
|
|
940
1097
|
|
|
941
|
-
|
|
942
|
-
|
|
1098
|
+
|
|
1099
|
+
</td>
|
|
943
1100
|
|
|
944
|
-
|
|
1101
|
+
|
|
945
1102
|
|
|
946
|
-
|
|
1103
|
+
|
|
947
1104
|
|
|
948
|
-
|
|
949
|
-
|
|
1105
|
+
<td class="description last"><p>Whether to format values by type</p></td>
|
|
1106
|
+
</tr>
|
|
950
1107
|
|
|
951
|
-
|
|
952
|
-
</tbody>
|
|
953
|
-
</table>
|
|
954
1108
|
|
|
1109
|
+
|
|
1110
|
+
</tbody>
|
|
1111
|
+
</table>
|
|
1112
|
+
</div>
|
|
955
1113
|
|
|
956
1114
|
|
|
957
1115
|
|
|
@@ -982,18 +1140,19 @@ console.log(jsonString);</code></pre>
|
|
|
982
1140
|
|
|
983
1141
|
|
|
984
1142
|
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
<dt class="tag-source">Source:</dt>
|
|
988
|
-
<dd class="tag-source"><ul class="dummy"><li>
|
|
989
|
-
<a href="src_csvToJsonAsync.js.html">src/csvToJsonAsync.js</a>, <a href="src_csvToJsonAsync.js.html#line26">line 26</a>
|
|
990
|
-
</li></ul></dd>
|
|
991
1143
|
|
|
992
1144
|
|
|
993
1145
|
|
|
994
1146
|
|
|
995
1147
|
|
|
996
1148
|
|
|
1149
|
+
|
|
1150
|
+
<p class="tag-source">
|
|
1151
|
+
<a href="src_csvToJsonAsync.js.html" class="button">View Source</a>
|
|
1152
|
+
<span>
|
|
1153
|
+
<a href="src_csvToJsonAsync.js.html">src/csvToJsonAsync.js</a>, <a href="src_csvToJsonAsync.js.html#line27">line 27</a>
|
|
1154
|
+
</span>
|
|
1155
|
+
</p>
|
|
997
1156
|
|
|
998
1157
|
</dl>
|
|
999
1158
|
|
|
@@ -1011,49 +1170,64 @@ console.log(jsonString);</code></pre>
|
|
|
1011
1170
|
|
|
1012
1171
|
|
|
1013
1172
|
|
|
1014
|
-
<h5>Returns:</h5>
|
|
1015
1173
|
|
|
1016
|
-
|
|
1017
|
-
<div class="param-desc">
|
|
1018
|
-
<p>For method chaining</p>
|
|
1019
|
-
</div>
|
|
1020
1174
|
|
|
1021
1175
|
|
|
1176
|
+
<div class='columns method-parameter'>
|
|
1177
|
+
<div class="column is-2"><label>Returns:</label></div>
|
|
1178
|
+
<div class="column is-10">
|
|
1179
|
+
|
|
1180
|
+
|
|
1022
1181
|
|
|
1023
|
-
<
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1182
|
+
<div class="columns">
|
|
1183
|
+
|
|
1184
|
+
<div class='param-desc column is-7'><p>For method chaining</p></div>
|
|
1185
|
+
|
|
1186
|
+
|
|
1187
|
+
<div class='column is-5 has-text-left'>
|
|
1188
|
+
<label>Type: </label>
|
|
1028
1189
|
|
|
1029
|
-
<
|
|
1190
|
+
<code class="param-type">this</code>
|
|
1030
1191
|
|
|
1031
1192
|
|
|
1032
|
-
</
|
|
1033
|
-
</dl>
|
|
1034
|
-
|
|
1193
|
+
</div>
|
|
1035
1194
|
|
|
1195
|
+
</div>
|
|
1036
1196
|
|
|
1197
|
+
|
|
1198
|
+
</div>
|
|
1199
|
+
</div>
|
|
1037
1200
|
|
|
1038
1201
|
|
|
1039
1202
|
|
|
1040
1203
|
|
|
1041
|
-
|
|
1204
|
+
</div>
|
|
1042
1205
|
|
|
1206
|
+
<div class="member">
|
|
1043
1207
|
|
|
1044
|
-
|
|
1045
1208
|
|
|
1046
1209
|
|
|
1047
|
-
<h4 class="name" id="generateJsonFileFromCsv"
|
|
1210
|
+
<h4 class="name" id="generateJsonFileFromCsv">
|
|
1211
|
+
<a class="href-link" href="#generateJsonFileFromCsv">#</a>
|
|
1212
|
+
|
|
1213
|
+
|
|
1214
|
+
<span class='tag'>async</span>
|
|
1215
|
+
|
|
1216
|
+
|
|
1217
|
+
<span class="code-name">
|
|
1218
|
+
|
|
1219
|
+
generateJsonFileFromCsv<span class="signature">(fileInputName, fileOutputName)</span><span class="type-signature"> → {Promise.<void>}</span>
|
|
1220
|
+
|
|
1221
|
+
</span>
|
|
1222
|
+
</h4>
|
|
1048
1223
|
|
|
1049
1224
|
|
|
1050
1225
|
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
</div>
|
|
1226
|
+
|
|
1227
|
+
<div class="description">
|
|
1228
|
+
<p>Read a CSV file and write parsed JSON to an output file (async)</p>
|
|
1229
|
+
</div>
|
|
1230
|
+
|
|
1057
1231
|
|
|
1058
1232
|
|
|
1059
1233
|
|
|
@@ -1065,83 +1239,85 @@ console.log(jsonString);</code></pre>
|
|
|
1065
1239
|
|
|
1066
1240
|
<h5>Parameters:</h5>
|
|
1067
1241
|
|
|
1242
|
+
<div class="table-container">
|
|
1243
|
+
<table class="params table">
|
|
1244
|
+
<thead>
|
|
1245
|
+
<tr>
|
|
1246
|
+
|
|
1247
|
+
<th>Name</th>
|
|
1248
|
+
|
|
1068
1249
|
|
|
1069
|
-
<
|
|
1070
|
-
<thead>
|
|
1071
|
-
<tr>
|
|
1072
|
-
|
|
1073
|
-
<th>Name</th>
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
<th>Type</th>
|
|
1250
|
+
<th>Type</th>
|
|
1077
1251
|
|
|
1078
|
-
|
|
1252
|
+
|
|
1079
1253
|
|
|
1080
|
-
|
|
1254
|
+
|
|
1081
1255
|
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1256
|
+
<th class="last">Description</th>
|
|
1257
|
+
</tr>
|
|
1258
|
+
</thead>
|
|
1085
1259
|
|
|
1086
|
-
|
|
1087
|
-
|
|
1260
|
+
<tbody>
|
|
1261
|
+
|
|
1088
1262
|
|
|
1089
|
-
<tr>
|
|
1090
|
-
|
|
1091
|
-
<td class="name"><code>fileInputName</code></td>
|
|
1092
1263
|
|
|
1264
|
+
<tr class="deep-level-0">
|
|
1265
|
+
|
|
1266
|
+
<td class="name"><code>fileInputName</code></td>
|
|
1267
|
+
|
|
1093
1268
|
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
<
|
|
1269
|
+
<td class="type">
|
|
1270
|
+
|
|
1271
|
+
|
|
1272
|
+
<code class="param-type">string</code>
|
|
1098
1273
|
|
|
1099
1274
|
|
|
1100
|
-
|
|
1101
|
-
|
|
1275
|
+
|
|
1276
|
+
</td>
|
|
1102
1277
|
|
|
1103
|
-
|
|
1278
|
+
|
|
1104
1279
|
|
|
1105
|
-
|
|
1280
|
+
|
|
1106
1281
|
|
|
1107
|
-
|
|
1108
|
-
|
|
1282
|
+
<td class="description last"><p>Path to input CSV file</p></td>
|
|
1283
|
+
</tr>
|
|
1109
1284
|
|
|
1110
|
-
|
|
1111
1285
|
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
<td class="name"><code>fileOutputName</code></td>
|
|
1115
|
-
|
|
1286
|
+
|
|
1116
1287
|
|
|
1117
|
-
<td class="type">
|
|
1118
1288
|
|
|
1119
|
-
|
|
1120
|
-
|
|
1289
|
+
<tr class="deep-level-0">
|
|
1290
|
+
|
|
1291
|
+
<td class="name"><code>fileOutputName</code></td>
|
|
1292
|
+
|
|
1121
1293
|
|
|
1294
|
+
<td class="type">
|
|
1295
|
+
|
|
1296
|
+
|
|
1297
|
+
<code class="param-type">string</code>
|
|
1122
1298
|
|
|
1123
|
-
|
|
1124
|
-
</td>
|
|
1125
1299
|
|
|
1126
|
-
|
|
1300
|
+
|
|
1301
|
+
</td>
|
|
1127
1302
|
|
|
1128
|
-
|
|
1303
|
+
|
|
1129
1304
|
|
|
1130
|
-
|
|
1131
|
-
</tr>
|
|
1305
|
+
|
|
1132
1306
|
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
</table>
|
|
1307
|
+
<td class="description last"><p>Path to output JSON file</p></td>
|
|
1308
|
+
</tr>
|
|
1136
1309
|
|
|
1137
1310
|
|
|
1311
|
+
|
|
1312
|
+
</tbody>
|
|
1313
|
+
</table>
|
|
1314
|
+
</div>
|
|
1138
1315
|
|
|
1139
1316
|
|
|
1140
1317
|
|
|
1141
1318
|
|
|
1142
|
-
<dl class="details">
|
|
1143
1319
|
|
|
1144
|
-
|
|
1320
|
+
<dl class="details">
|
|
1145
1321
|
|
|
1146
1322
|
|
|
1147
1323
|
|
|
@@ -1166,16 +1342,19 @@ console.log(jsonString);</code></pre>
|
|
|
1166
1342
|
|
|
1167
1343
|
|
|
1168
1344
|
|
|
1169
|
-
<dt class="tag-source">Source:</dt>
|
|
1170
|
-
<dd class="tag-source"><ul class="dummy"><li>
|
|
1171
|
-
<a href="src_csvToJsonAsync.js.html">src/csvToJsonAsync.js</a>, <a href="src_csvToJsonAsync.js.html#line110">line 110</a>
|
|
1172
|
-
</li></ul></dd>
|
|
1173
1345
|
|
|
1174
1346
|
|
|
1175
1347
|
|
|
1176
1348
|
|
|
1177
1349
|
|
|
1178
1350
|
|
|
1351
|
+
|
|
1352
|
+
<p class="tag-source">
|
|
1353
|
+
<a href="src_csvToJsonAsync.js.html" class="button">View Source</a>
|
|
1354
|
+
<span>
|
|
1355
|
+
<a href="src_csvToJsonAsync.js.html">src/csvToJsonAsync.js</a>, <a href="src_csvToJsonAsync.js.html#line111">line 111</a>
|
|
1356
|
+
</span>
|
|
1357
|
+
</p>
|
|
1179
1358
|
|
|
1180
1359
|
</dl>
|
|
1181
1360
|
|
|
@@ -1191,104 +1370,100 @@ console.log(jsonString);</code></pre>
|
|
|
1191
1370
|
|
|
1192
1371
|
|
|
1193
1372
|
|
|
1194
|
-
<h5>Throws:</h5>
|
|
1195
|
-
<ul>
|
|
1196
|
-
<li>
|
|
1197
1373
|
|
|
1198
|
-
<dl>
|
|
1199
|
-
<dt>
|
|
1200
|
-
<div class="param-desc">
|
|
1201
|
-
<p>If file operations fail</p>
|
|
1202
|
-
</div>
|
|
1203
|
-
</dt>
|
|
1204
|
-
<dd></dd>
|
|
1205
|
-
<dt>
|
|
1206
|
-
<dl>
|
|
1207
|
-
<dt>
|
|
1208
|
-
Type
|
|
1209
|
-
</dt>
|
|
1210
|
-
<dd>
|
|
1211
|
-
|
|
1212
|
-
<span class="param-type"><a href="FileOperationError.html">FileOperationError</a></span>
|
|
1213
1374
|
|
|
1214
1375
|
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1376
|
+
<div class='columns method-parameter'>
|
|
1377
|
+
<div class="column is-2"><label>Throws:</label></div>
|
|
1378
|
+
<div class="column is-10">
|
|
1379
|
+
|
|
1380
|
+
|
|
1381
|
+
<div class="columns">
|
|
1382
|
+
|
|
1383
|
+
<div class='param-desc column is-7'><p>If file operations fail</p></div>
|
|
1384
|
+
<div class='column is-5 has-text-left'>
|
|
1385
|
+
<label>Type: </label>
|
|
1386
|
+
<code class="param-type"><a href="FileOperationError.html">FileOperationError</a></code>
|
|
1387
|
+
|
|
1220
1388
|
|
|
1221
|
-
</
|
|
1389
|
+
</div>
|
|
1222
1390
|
|
|
1223
|
-
|
|
1391
|
+
</div>
|
|
1224
1392
|
|
|
1225
|
-
<dl>
|
|
1226
|
-
<dt>
|
|
1227
|
-
<div class="param-desc">
|
|
1228
|
-
<p>If CSV is malformed</p>
|
|
1229
|
-
</div>
|
|
1230
|
-
</dt>
|
|
1231
|
-
<dd></dd>
|
|
1232
|
-
<dt>
|
|
1233
|
-
<dl>
|
|
1234
|
-
<dt>
|
|
1235
|
-
Type
|
|
1236
|
-
</dt>
|
|
1237
|
-
<dd>
|
|
1238
1393
|
|
|
1239
|
-
|
|
1240
|
-
|
|
1394
|
+
|
|
1395
|
+
<div class="columns">
|
|
1396
|
+
|
|
1397
|
+
<div class='param-desc column is-7'><p>If CSV is malformed</p></div>
|
|
1398
|
+
<div class='column is-5 has-text-left'>
|
|
1399
|
+
<label>Type: </label>
|
|
1400
|
+
<code class="param-type"><a href="CsvFormatError.html">CsvFormatError</a></code>
|
|
1241
1401
|
|
|
1242
|
-
</dd>
|
|
1243
|
-
</dl>
|
|
1244
|
-
</dt>
|
|
1245
|
-
<dd></dd>
|
|
1246
|
-
</dl>
|
|
1247
1402
|
|
|
1248
|
-
</
|
|
1249
|
-
|
|
1403
|
+
</div>
|
|
1404
|
+
|
|
1405
|
+
</div>
|
|
1250
1406
|
|
|
1407
|
+
|
|
1408
|
+
</div>
|
|
1409
|
+
</div>
|
|
1251
1410
|
|
|
1252
|
-
<h5>Returns:</h5>
|
|
1253
1411
|
|
|
1254
|
-
|
|
1255
1412
|
|
|
1413
|
+
<div class='columns method-parameter'>
|
|
1414
|
+
<div class="column is-2"><label>Returns:</label></div>
|
|
1415
|
+
<div class="column is-10">
|
|
1416
|
+
|
|
1417
|
+
|
|
1256
1418
|
|
|
1257
|
-
<
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1419
|
+
<div class="columns">
|
|
1420
|
+
|
|
1421
|
+
|
|
1422
|
+
<div class='column is-5 has-text-left'>
|
|
1423
|
+
<label>Type: </label>
|
|
1262
1424
|
|
|
1263
|
-
<
|
|
1425
|
+
<code class="param-type">Promise.<void></code>
|
|
1264
1426
|
|
|
1265
1427
|
|
|
1266
|
-
</
|
|
1267
|
-
</dl>
|
|
1268
|
-
|
|
1428
|
+
</div>
|
|
1269
1429
|
|
|
1430
|
+
</div>
|
|
1270
1431
|
|
|
1432
|
+
|
|
1433
|
+
</div>
|
|
1434
|
+
</div>
|
|
1271
1435
|
|
|
1272
1436
|
|
|
1273
1437
|
|
|
1274
1438
|
|
|
1275
|
-
|
|
1439
|
+
</div>
|
|
1276
1440
|
|
|
1441
|
+
<div class="member">
|
|
1277
1442
|
|
|
1278
|
-
|
|
1279
1443
|
|
|
1280
1444
|
|
|
1281
|
-
<h4 class="name" id="getJsonFromCsvAsync"
|
|
1445
|
+
<h4 class="name" id="getJsonFromCsvAsync">
|
|
1446
|
+
<a class="href-link" href="#getJsonFromCsvAsync">#</a>
|
|
1447
|
+
|
|
1448
|
+
|
|
1449
|
+
<span class='tag'>async</span>
|
|
1450
|
+
|
|
1451
|
+
|
|
1452
|
+
<span class="code-name">
|
|
1453
|
+
|
|
1454
|
+
getJsonFromCsvAsync<span class="signature">(inputFileNameOrCsv, options)</span><span class="type-signature"> → {Promise.<Array.<object>>}</span>
|
|
1455
|
+
|
|
1456
|
+
</span>
|
|
1457
|
+
</h4>
|
|
1282
1458
|
|
|
1283
1459
|
|
|
1284
1460
|
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
<div class="description">
|
|
1289
|
-
<p>Main async API method for reading CSV and returning parsed JSON
|
|
1461
|
+
|
|
1462
|
+
<div class="description">
|
|
1463
|
+
<p>Main async API method for reading CSV and returning parsed JSON
|
|
1290
1464
|
Supports reading from file path or parsing CSV string content</p>
|
|
1291
|
-
</div>
|
|
1465
|
+
</div>
|
|
1466
|
+
|
|
1292
1467
|
|
|
1293
1468
|
|
|
1294
1469
|
|
|
@@ -1300,132 +1475,111 @@ Supports reading from file path or parsing CSV string content</p>
|
|
|
1300
1475
|
|
|
1301
1476
|
<h5>Parameters:</h5>
|
|
1302
1477
|
|
|
1303
|
-
|
|
1304
|
-
<table class="params">
|
|
1305
|
-
|
|
1306
|
-
<tr>
|
|
1307
|
-
|
|
1308
|
-
<th>Name</th>
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
<th>Type</th>
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
<th class="last">Description</th>
|
|
1318
|
-
</tr>
|
|
1319
|
-
</thead>
|
|
1320
|
-
|
|
1321
|
-
<tbody>
|
|
1322
|
-
|
|
1323
|
-
|
|
1478
|
+
<div class="table-container">
|
|
1479
|
+
<table class="params table">
|
|
1480
|
+
<thead>
|
|
1324
1481
|
<tr>
|
|
1325
1482
|
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
<td class="type">
|
|
1483
|
+
<th>Name</th>
|
|
1330
1484
|
|
|
1331
|
-
|
|
1332
|
-
<span class="param-type">string</span>
|
|
1333
|
-
|
|
1334
1485
|
|
|
1335
|
-
|
|
1336
|
-
</td>
|
|
1486
|
+
<th>Type</th>
|
|
1337
1487
|
|
|
1338
1488
|
|
|
1339
1489
|
|
|
1340
1490
|
|
|
1341
1491
|
|
|
1342
|
-
<
|
|
1492
|
+
<th class="last">Description</th>
|
|
1343
1493
|
</tr>
|
|
1494
|
+
</thead>
|
|
1344
1495
|
|
|
1345
|
-
|
|
1496
|
+
<tbody>
|
|
1497
|
+
|
|
1346
1498
|
|
|
1347
|
-
<tr>
|
|
1348
|
-
|
|
1349
|
-
<td class="name"><code>options</code></td>
|
|
1350
1499
|
|
|
1500
|
+
<tr class="deep-level-0">
|
|
1501
|
+
|
|
1502
|
+
<td class="name"><code>inputFileNameOrCsv</code></td>
|
|
1503
|
+
|
|
1351
1504
|
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
<
|
|
1505
|
+
<td class="type">
|
|
1506
|
+
|
|
1507
|
+
|
|
1508
|
+
<code class="param-type">string</code>
|
|
1356
1509
|
|
|
1357
1510
|
|
|
1358
|
-
|
|
1359
|
-
|
|
1511
|
+
|
|
1512
|
+
</td>
|
|
1360
1513
|
|
|
1361
|
-
|
|
1514
|
+
|
|
1362
1515
|
|
|
1363
|
-
|
|
1516
|
+
|
|
1517
|
+
|
|
1518
|
+
<td class="description last"><p>File path or CSV string content</p></td>
|
|
1519
|
+
</tr>
|
|
1364
1520
|
|
|
1365
|
-
<td class="description last"><p>Configuration options</p>
|
|
1366
|
-
<h6>Properties</h6>
|
|
1367
|
-
|
|
1368
1521
|
|
|
1369
|
-
<table class="params">
|
|
1370
|
-
<thead>
|
|
1371
|
-
<tr>
|
|
1372
|
-
|
|
1373
|
-
<th>Name</th>
|
|
1374
1522
|
|
|
1375
1523
|
|
|
1376
|
-
|
|
1524
|
+
|
|
1525
|
+
<tr class="deep-level-0">
|
|
1526
|
+
|
|
1527
|
+
<td class="name"><code>options</code></td>
|
|
1528
|
+
|
|
1377
1529
|
|
|
1378
|
-
|
|
1530
|
+
<td class="type">
|
|
1531
|
+
|
|
1532
|
+
|
|
1533
|
+
<code class="param-type">object</code>
|
|
1379
1534
|
|
|
1380
|
-
|
|
1381
1535
|
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
</thead>
|
|
1536
|
+
|
|
1537
|
+
</td>
|
|
1385
1538
|
|
|
1386
|
-
|
|
1387
|
-
|
|
1539
|
+
|
|
1388
1540
|
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
<td class="name"><code>raw</code></td>
|
|
1392
|
-
|
|
1541
|
+
|
|
1393
1542
|
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
<span class="param-type">boolean</span>
|
|
1543
|
+
<td class="description last"><p>Configuration options</p></td>
|
|
1544
|
+
</tr>
|
|
1398
1545
|
|
|
1546
|
+
|
|
1547
|
+
|
|
1548
|
+
|
|
1549
|
+
<tr class="deep-level-1">
|
|
1550
|
+
|
|
1551
|
+
<td class="name"><code>raw</code></td>
|
|
1552
|
+
|
|
1399
1553
|
|
|
1400
|
-
|
|
1401
|
-
|
|
1554
|
+
<td class="type">
|
|
1555
|
+
|
|
1556
|
+
|
|
1557
|
+
<code class="param-type">boolean</code>
|
|
1402
1558
|
|
|
1403
|
-
|
|
1404
1559
|
|
|
1405
|
-
|
|
1560
|
+
|
|
1561
|
+
</td>
|
|
1406
1562
|
|
|
1407
|
-
|
|
1408
|
-
</tr>
|
|
1563
|
+
|
|
1409
1564
|
|
|
1410
|
-
|
|
1411
|
-
</tbody>
|
|
1412
|
-
</table>
|
|
1565
|
+
|
|
1413
1566
|
|
|
1414
|
-
|
|
1415
|
-
|
|
1567
|
+
<td class="description last"><p>If true, treats input as CSV string; if false, reads from file</p></td>
|
|
1568
|
+
</tr>
|
|
1416
1569
|
|
|
1417
|
-
|
|
1418
|
-
</tbody>
|
|
1419
|
-
</table>
|
|
1570
|
+
|
|
1420
1571
|
|
|
1421
1572
|
|
|
1573
|
+
|
|
1574
|
+
</tbody>
|
|
1575
|
+
</table>
|
|
1576
|
+
</div>
|
|
1422
1577
|
|
|
1423
1578
|
|
|
1424
1579
|
|
|
1425
1580
|
|
|
1426
|
-
<dl class="details">
|
|
1427
1581
|
|
|
1428
|
-
|
|
1582
|
+
<dl class="details">
|
|
1429
1583
|
|
|
1430
1584
|
|
|
1431
1585
|
|
|
@@ -1450,16 +1604,19 @@ Supports reading from file path or parsing CSV string content</p>
|
|
|
1450
1604
|
|
|
1451
1605
|
|
|
1452
1606
|
|
|
1453
|
-
<dt class="tag-source">Source:</dt>
|
|
1454
|
-
<dd class="tag-source"><ul class="dummy"><li>
|
|
1455
|
-
<a href="src_csvToJsonAsync.js.html">src/csvToJsonAsync.js</a>, <a href="src_csvToJsonAsync.js.html#line142">line 142</a>
|
|
1456
|
-
</li></ul></dd>
|
|
1457
1607
|
|
|
1458
1608
|
|
|
1459
1609
|
|
|
1460
1610
|
|
|
1461
1611
|
|
|
1462
1612
|
|
|
1613
|
+
|
|
1614
|
+
<p class="tag-source">
|
|
1615
|
+
<a href="src_csvToJsonAsync.js.html" class="button">View Source</a>
|
|
1616
|
+
<span>
|
|
1617
|
+
<a href="src_csvToJsonAsync.js.html">src/csvToJsonAsync.js</a>, <a href="src_csvToJsonAsync.js.html#line143">line 143</a>
|
|
1618
|
+
</span>
|
|
1619
|
+
</p>
|
|
1463
1620
|
|
|
1464
1621
|
</dl>
|
|
1465
1622
|
|
|
@@ -1475,144 +1632,127 @@ Supports reading from file path or parsing CSV string content</p>
|
|
|
1475
1632
|
|
|
1476
1633
|
|
|
1477
1634
|
|
|
1478
|
-
<h5>Throws:</h5>
|
|
1479
|
-
<ul>
|
|
1480
|
-
<li>
|
|
1481
1635
|
|
|
1482
|
-
<dl>
|
|
1483
|
-
<dt>
|
|
1484
|
-
<div class="param-desc">
|
|
1485
|
-
<p>If input is invalid</p>
|
|
1486
|
-
</div>
|
|
1487
|
-
</dt>
|
|
1488
|
-
<dd></dd>
|
|
1489
|
-
<dt>
|
|
1490
|
-
<dl>
|
|
1491
|
-
<dt>
|
|
1492
|
-
Type
|
|
1493
|
-
</dt>
|
|
1494
|
-
<dd>
|
|
1495
|
-
|
|
1496
|
-
<span class="param-type"><a href="InputValidationError.html">InputValidationError</a></span>
|
|
1497
1636
|
|
|
1498
1637
|
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1638
|
+
<div class='columns method-parameter'>
|
|
1639
|
+
<div class="column is-2"><label>Throws:</label></div>
|
|
1640
|
+
<div class="column is-10">
|
|
1641
|
+
|
|
1642
|
+
|
|
1643
|
+
<div class="columns">
|
|
1644
|
+
|
|
1645
|
+
<div class='param-desc column is-7'><p>If input is invalid</p></div>
|
|
1646
|
+
<div class='column is-5 has-text-left'>
|
|
1647
|
+
<label>Type: </label>
|
|
1648
|
+
<code class="param-type"><a href="InputValidationError.html">InputValidationError</a></code>
|
|
1649
|
+
|
|
1504
1650
|
|
|
1505
|
-
</
|
|
1651
|
+
</div>
|
|
1506
1652
|
|
|
1507
|
-
|
|
1653
|
+
</div>
|
|
1508
1654
|
|
|
1509
|
-
<dl>
|
|
1510
|
-
<dt>
|
|
1511
|
-
<div class="param-desc">
|
|
1512
|
-
<p>If file read fails</p>
|
|
1513
|
-
</div>
|
|
1514
|
-
</dt>
|
|
1515
|
-
<dd></dd>
|
|
1516
|
-
<dt>
|
|
1517
|
-
<dl>
|
|
1518
|
-
<dt>
|
|
1519
|
-
Type
|
|
1520
|
-
</dt>
|
|
1521
|
-
<dd>
|
|
1522
1655
|
|
|
1523
|
-
|
|
1524
|
-
|
|
1656
|
+
|
|
1657
|
+
<div class="columns">
|
|
1658
|
+
|
|
1659
|
+
<div class='param-desc column is-7'><p>If file read fails</p></div>
|
|
1660
|
+
<div class='column is-5 has-text-left'>
|
|
1661
|
+
<label>Type: </label>
|
|
1662
|
+
<code class="param-type"><a href="FileOperationError.html">FileOperationError</a></code>
|
|
1525
1663
|
|
|
1526
|
-
</dd>
|
|
1527
|
-
</dl>
|
|
1528
|
-
</dt>
|
|
1529
|
-
<dd></dd>
|
|
1530
|
-
</dl>
|
|
1531
1664
|
|
|
1532
|
-
</
|
|
1665
|
+
</div>
|
|
1533
1666
|
|
|
1534
|
-
|
|
1667
|
+
</div>
|
|
1535
1668
|
|
|
1536
|
-
<dl>
|
|
1537
|
-
<dt>
|
|
1538
|
-
<div class="param-desc">
|
|
1539
|
-
<p>If CSV is malformed</p>
|
|
1540
|
-
</div>
|
|
1541
|
-
</dt>
|
|
1542
|
-
<dd></dd>
|
|
1543
|
-
<dt>
|
|
1544
|
-
<dl>
|
|
1545
|
-
<dt>
|
|
1546
|
-
Type
|
|
1547
|
-
</dt>
|
|
1548
|
-
<dd>
|
|
1549
1669
|
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
</dl>
|
|
1670
|
+
|
|
1671
|
+
<div class="columns">
|
|
1672
|
+
|
|
1673
|
+
<div class='param-desc column is-7'><p>If CSV is malformed</p></div>
|
|
1674
|
+
<div class='column is-5 has-text-left'>
|
|
1675
|
+
<label>Type: </label>
|
|
1676
|
+
<code class="param-type"><a href="CsvFormatError.html">CsvFormatError</a></code>
|
|
1558
1677
|
|
|
1559
|
-
</li>
|
|
1560
|
-
</ul>
|
|
1561
1678
|
|
|
1679
|
+
</div>
|
|
1680
|
+
|
|
1681
|
+
</div>
|
|
1562
1682
|
|
|
1563
|
-
|
|
1683
|
+
|
|
1684
|
+
</div>
|
|
1685
|
+
</div>
|
|
1564
1686
|
|
|
1565
|
-
|
|
1566
|
-
<div class="param-desc">
|
|
1567
|
-
<p>Array of objects representing CSV rows</p>
|
|
1568
|
-
</div>
|
|
1569
1687
|
|
|
1570
1688
|
|
|
1689
|
+
<div class='columns method-parameter'>
|
|
1690
|
+
<div class="column is-2"><label>Returns:</label></div>
|
|
1691
|
+
<div class="column is-10">
|
|
1692
|
+
|
|
1693
|
+
|
|
1571
1694
|
|
|
1572
|
-
<
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1695
|
+
<div class="columns">
|
|
1696
|
+
|
|
1697
|
+
<div class='param-desc column is-7'><p>Array of objects representing CSV rows</p></div>
|
|
1698
|
+
|
|
1699
|
+
|
|
1700
|
+
<div class='column is-5 has-text-left'>
|
|
1701
|
+
<label>Type: </label>
|
|
1577
1702
|
|
|
1578
|
-
<
|
|
1579
|
-
|
|
1703
|
+
<code class="param-type">Promise.<Array.<object>></code>
|
|
1580
1704
|
|
|
1581
|
-
</dd>
|
|
1582
|
-
</dl>
|
|
1583
1705
|
|
|
1706
|
+
</div>
|
|
1584
1707
|
|
|
1708
|
+
</div>
|
|
1709
|
+
|
|
1710
|
+
|
|
1711
|
+
</div>
|
|
1712
|
+
</div>
|
|
1585
1713
|
|
|
1586
1714
|
|
|
1587
1715
|
|
|
1588
1716
|
|
|
1589
1717
|
<h5>Example</h5>
|
|
1590
1718
|
|
|
1591
|
-
|
|
1719
|
+
|
|
1720
|
+
<pre class="prettyprint"><code>const csvToJson = require('convert-csv-to-json');
|
|
1592
1721
|
const data = await csvToJson.getJsonFromCsvAsync('resource/input.csv');
|
|
1593
1722
|
console.log(data);</code></pre>
|
|
1723
|
+
|
|
1594
1724
|
|
|
1595
1725
|
|
|
1726
|
+
</div>
|
|
1727
|
+
|
|
1728
|
+
<div class="member">
|
|
1596
1729
|
|
|
1730
|
+
|
|
1731
|
+
|
|
1732
|
+
<h4 class="name" id="getJsonFromCsvStringified">
|
|
1733
|
+
<a class="href-link" href="#getJsonFromCsvStringified">#</a>
|
|
1597
1734
|
|
|
1598
1735
|
|
|
1599
|
-
|
|
1736
|
+
<span class='tag'>async</span>
|
|
1737
|
+
|
|
1738
|
+
|
|
1739
|
+
<span class="code-name">
|
|
1740
|
+
|
|
1741
|
+
getJsonFromCsvStringified<span class="signature">(fileInputName)</span><span class="type-signature"> → {Promise.<string>}</span>
|
|
1742
|
+
|
|
1743
|
+
</span>
|
|
1744
|
+
</h4>
|
|
1600
1745
|
|
|
1601
1746
|
|
|
1602
1747
|
|
|
1603
|
-
<h4 class="name" id="getJsonFromCsvStringified"><span class="type-signature">(async) </span>getJsonFromCsvStringified<span class="signature">(fileInputName)</span><span class="type-signature"> → {Promise.<string>}</span></h4>
|
|
1604
1748
|
|
|
1605
|
-
|
|
1749
|
+
<div class="description">
|
|
1750
|
+
<p>Read a CSV file and return parsed data as stringified JSON (async)</p>
|
|
1751
|
+
</div>
|
|
1606
1752
|
|
|
1607
1753
|
|
|
1608
1754
|
|
|
1609
1755
|
|
|
1610
|
-
<div class="description">
|
|
1611
|
-
<p>Read a CSV file and return parsed data as stringified JSON (async)</p>
|
|
1612
|
-
</div>
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
1756
|
|
|
1617
1757
|
|
|
1618
1758
|
|
|
@@ -1621,52 +1761,54 @@ console.log(data);</code></pre>
|
|
|
1621
1761
|
|
|
1622
1762
|
<h5>Parameters:</h5>
|
|
1623
1763
|
|
|
1764
|
+
<div class="table-container">
|
|
1765
|
+
<table class="params table">
|
|
1766
|
+
<thead>
|
|
1767
|
+
<tr>
|
|
1768
|
+
|
|
1769
|
+
<th>Name</th>
|
|
1770
|
+
|
|
1624
1771
|
|
|
1625
|
-
<
|
|
1626
|
-
<thead>
|
|
1627
|
-
<tr>
|
|
1628
|
-
|
|
1629
|
-
<th>Name</th>
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
<th>Type</th>
|
|
1772
|
+
<th>Type</th>
|
|
1633
1773
|
|
|
1634
|
-
|
|
1774
|
+
|
|
1635
1775
|
|
|
1636
|
-
|
|
1776
|
+
|
|
1637
1777
|
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1778
|
+
<th class="last">Description</th>
|
|
1779
|
+
</tr>
|
|
1780
|
+
</thead>
|
|
1641
1781
|
|
|
1642
|
-
|
|
1643
|
-
|
|
1782
|
+
<tbody>
|
|
1783
|
+
|
|
1644
1784
|
|
|
1645
|
-
<tr>
|
|
1646
|
-
|
|
1647
|
-
<td class="name"><code>fileInputName</code></td>
|
|
1648
1785
|
|
|
1786
|
+
<tr class="deep-level-0">
|
|
1787
|
+
|
|
1788
|
+
<td class="name"><code>fileInputName</code></td>
|
|
1789
|
+
|
|
1649
1790
|
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
<
|
|
1791
|
+
<td class="type">
|
|
1792
|
+
|
|
1793
|
+
|
|
1794
|
+
<code class="param-type">string</code>
|
|
1654
1795
|
|
|
1655
1796
|
|
|
1656
|
-
|
|
1657
|
-
|
|
1797
|
+
|
|
1798
|
+
</td>
|
|
1658
1799
|
|
|
1659
|
-
|
|
1800
|
+
|
|
1660
1801
|
|
|
1661
|
-
|
|
1802
|
+
|
|
1662
1803
|
|
|
1663
|
-
|
|
1664
|
-
|
|
1804
|
+
<td class="description last"><p>Path to input CSV file</p></td>
|
|
1805
|
+
</tr>
|
|
1665
1806
|
|
|
1666
|
-
|
|
1667
|
-
</tbody>
|
|
1668
|
-
</table>
|
|
1669
1807
|
|
|
1808
|
+
|
|
1809
|
+
</tbody>
|
|
1810
|
+
</table>
|
|
1811
|
+
</div>
|
|
1670
1812
|
|
|
1671
1813
|
|
|
1672
1814
|
|
|
@@ -1697,18 +1839,19 @@ console.log(data);</code></pre>
|
|
|
1697
1839
|
|
|
1698
1840
|
|
|
1699
1841
|
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
<dt class="tag-source">Source:</dt>
|
|
1703
|
-
<dd class="tag-source"><ul class="dummy"><li>
|
|
1704
|
-
<a href="src_csvToJsonAsync.js.html">src/csvToJsonAsync.js</a>, <a href="src_csvToJsonAsync.js.html#line122">line 122</a>
|
|
1705
|
-
</li></ul></dd>
|
|
1706
1842
|
|
|
1707
1843
|
|
|
1708
1844
|
|
|
1709
1845
|
|
|
1710
1846
|
|
|
1711
1847
|
|
|
1848
|
+
|
|
1849
|
+
<p class="tag-source">
|
|
1850
|
+
<a href="src_csvToJsonAsync.js.html" class="button">View Source</a>
|
|
1851
|
+
<span>
|
|
1852
|
+
<a href="src_csvToJsonAsync.js.html">src/csvToJsonAsync.js</a>, <a href="src_csvToJsonAsync.js.html#line123">line 123</a>
|
|
1853
|
+
</span>
|
|
1854
|
+
</p>
|
|
1712
1855
|
|
|
1713
1856
|
</dl>
|
|
1714
1857
|
|
|
@@ -1724,107 +1867,97 @@ console.log(data);</code></pre>
|
|
|
1724
1867
|
|
|
1725
1868
|
|
|
1726
1869
|
|
|
1727
|
-
<h5>Throws:</h5>
|
|
1728
|
-
<ul>
|
|
1729
|
-
<li>
|
|
1730
1870
|
|
|
1731
|
-
<dl>
|
|
1732
|
-
<dt>
|
|
1733
|
-
<div class="param-desc">
|
|
1734
|
-
<p>If file read fails</p>
|
|
1735
|
-
</div>
|
|
1736
|
-
</dt>
|
|
1737
|
-
<dd></dd>
|
|
1738
|
-
<dt>
|
|
1739
|
-
<dl>
|
|
1740
|
-
<dt>
|
|
1741
|
-
Type
|
|
1742
|
-
</dt>
|
|
1743
|
-
<dd>
|
|
1744
|
-
|
|
1745
|
-
<span class="param-type"><a href="FileOperationError.html">FileOperationError</a></span>
|
|
1746
1871
|
|
|
1747
1872
|
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
</li>
|
|
1873
|
+
<div class='columns method-parameter'>
|
|
1874
|
+
<div class="column is-2"><label>Throws:</label></div>
|
|
1875
|
+
<div class="column is-10">
|
|
1876
|
+
|
|
1877
|
+
|
|
1878
|
+
<div class="columns">
|
|
1755
1879
|
|
|
1756
|
-
|
|
1880
|
+
<div class='param-desc column is-7'><p>If file read fails</p></div>
|
|
1881
|
+
<div class='column is-5 has-text-left'>
|
|
1882
|
+
<label>Type: </label>
|
|
1883
|
+
<code class="param-type"><a href="FileOperationError.html">FileOperationError</a></code>
|
|
1757
1884
|
|
|
1758
|
-
<dl>
|
|
1759
|
-
<dt>
|
|
1760
|
-
<div class="param-desc">
|
|
1761
|
-
<p>If CSV is malformed</p>
|
|
1762
|
-
</div>
|
|
1763
|
-
</dt>
|
|
1764
|
-
<dd></dd>
|
|
1765
|
-
<dt>
|
|
1766
|
-
<dl>
|
|
1767
|
-
<dt>
|
|
1768
|
-
Type
|
|
1769
|
-
</dt>
|
|
1770
|
-
<dd>
|
|
1771
|
-
|
|
1772
|
-
<span class="param-type"><a href="CsvFormatError.html">CsvFormatError</a></span>
|
|
1773
1885
|
|
|
1886
|
+
</div>
|
|
1887
|
+
|
|
1888
|
+
</div>
|
|
1774
1889
|
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
</
|
|
1890
|
+
|
|
1891
|
+
|
|
1892
|
+
<div class="columns">
|
|
1893
|
+
|
|
1894
|
+
<div class='param-desc column is-7'><p>If CSV is malformed</p></div>
|
|
1895
|
+
<div class='column is-5 has-text-left'>
|
|
1896
|
+
<label>Type: </label>
|
|
1897
|
+
<code class="param-type"><a href="CsvFormatError.html">CsvFormatError</a></code>
|
|
1780
1898
|
|
|
1781
|
-
</li>
|
|
1782
|
-
</ul>
|
|
1783
1899
|
|
|
1900
|
+
</div>
|
|
1901
|
+
|
|
1902
|
+
</div>
|
|
1784
1903
|
|
|
1785
|
-
|
|
1904
|
+
|
|
1905
|
+
</div>
|
|
1906
|
+
</div>
|
|
1786
1907
|
|
|
1787
|
-
|
|
1788
|
-
<div class="param-desc">
|
|
1789
|
-
<p>JSON stringified array of objects</p>
|
|
1790
|
-
</div>
|
|
1791
1908
|
|
|
1792
1909
|
|
|
1910
|
+
<div class='columns method-parameter'>
|
|
1911
|
+
<div class="column is-2"><label>Returns:</label></div>
|
|
1912
|
+
<div class="column is-10">
|
|
1913
|
+
|
|
1914
|
+
|
|
1793
1915
|
|
|
1794
|
-
<
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1916
|
+
<div class="columns">
|
|
1917
|
+
|
|
1918
|
+
<div class='param-desc column is-7'><p>JSON stringified array of objects</p></div>
|
|
1919
|
+
|
|
1920
|
+
|
|
1921
|
+
<div class='column is-5 has-text-left'>
|
|
1922
|
+
<label>Type: </label>
|
|
1799
1923
|
|
|
1800
|
-
<
|
|
1924
|
+
<code class="param-type">Promise.<string></code>
|
|
1801
1925
|
|
|
1802
1926
|
|
|
1803
|
-
</
|
|
1804
|
-
</dl>
|
|
1805
|
-
|
|
1927
|
+
</div>
|
|
1806
1928
|
|
|
1929
|
+
</div>
|
|
1807
1930
|
|
|
1931
|
+
|
|
1932
|
+
</div>
|
|
1933
|
+
</div>
|
|
1808
1934
|
|
|
1809
1935
|
|
|
1810
1936
|
|
|
1811
1937
|
|
|
1812
|
-
|
|
1938
|
+
</div>
|
|
1813
1939
|
|
|
1940
|
+
<div class="member">
|
|
1814
1941
|
|
|
1815
|
-
|
|
1816
1942
|
|
|
1817
1943
|
|
|
1818
|
-
<h4 class="name" id="indexHeader"
|
|
1944
|
+
<h4 class="name" id="indexHeader">
|
|
1945
|
+
<a class="href-link" href="#indexHeader">#</a>
|
|
1946
|
+
|
|
1947
|
+
<span class="code-name">
|
|
1948
|
+
|
|
1949
|
+
indexHeader<span class="signature">(indexHeader)</span><span class="type-signature"> → {this}</span>
|
|
1950
|
+
|
|
1951
|
+
</span>
|
|
1952
|
+
</h4>
|
|
1819
1953
|
|
|
1820
1954
|
|
|
1821
1955
|
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
</div>
|
|
1956
|
+
|
|
1957
|
+
<div class="description">
|
|
1958
|
+
<p>Set the row index where CSV headers are located</p>
|
|
1959
|
+
</div>
|
|
1960
|
+
|
|
1828
1961
|
|
|
1829
1962
|
|
|
1830
1963
|
|
|
@@ -1836,52 +1969,54 @@ console.log(data);</code></pre>
|
|
|
1836
1969
|
|
|
1837
1970
|
<h5>Parameters:</h5>
|
|
1838
1971
|
|
|
1972
|
+
<div class="table-container">
|
|
1973
|
+
<table class="params table">
|
|
1974
|
+
<thead>
|
|
1975
|
+
<tr>
|
|
1976
|
+
|
|
1977
|
+
<th>Name</th>
|
|
1978
|
+
|
|
1839
1979
|
|
|
1840
|
-
<
|
|
1841
|
-
<thead>
|
|
1842
|
-
<tr>
|
|
1843
|
-
|
|
1844
|
-
<th>Name</th>
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
<th>Type</th>
|
|
1980
|
+
<th>Type</th>
|
|
1848
1981
|
|
|
1849
|
-
|
|
1982
|
+
|
|
1850
1983
|
|
|
1851
|
-
|
|
1984
|
+
|
|
1852
1985
|
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1986
|
+
<th class="last">Description</th>
|
|
1987
|
+
</tr>
|
|
1988
|
+
</thead>
|
|
1856
1989
|
|
|
1857
|
-
|
|
1858
|
-
|
|
1990
|
+
<tbody>
|
|
1991
|
+
|
|
1859
1992
|
|
|
1860
|
-
<tr>
|
|
1861
|
-
|
|
1862
|
-
<td class="name"><code>indexHeader</code></td>
|
|
1863
1993
|
|
|
1994
|
+
<tr class="deep-level-0">
|
|
1995
|
+
|
|
1996
|
+
<td class="name"><code>indexHeader</code></td>
|
|
1997
|
+
|
|
1864
1998
|
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
<
|
|
1999
|
+
<td class="type">
|
|
2000
|
+
|
|
2001
|
+
|
|
2002
|
+
<code class="param-type">number</code>
|
|
1869
2003
|
|
|
1870
2004
|
|
|
1871
|
-
|
|
1872
|
-
|
|
2005
|
+
|
|
2006
|
+
</td>
|
|
1873
2007
|
|
|
1874
|
-
|
|
2008
|
+
|
|
1875
2009
|
|
|
1876
|
-
|
|
2010
|
+
|
|
1877
2011
|
|
|
1878
|
-
|
|
1879
|
-
|
|
2012
|
+
<td class="description last"><p>Zero-based row index containing headers</p></td>
|
|
2013
|
+
</tr>
|
|
1880
2014
|
|
|
1881
|
-
|
|
1882
|
-
</tbody>
|
|
1883
|
-
</table>
|
|
1884
2015
|
|
|
2016
|
+
|
|
2017
|
+
</tbody>
|
|
2018
|
+
</table>
|
|
2019
|
+
</div>
|
|
1885
2020
|
|
|
1886
2021
|
|
|
1887
2022
|
|
|
@@ -1912,18 +2047,19 @@ console.log(data);</code></pre>
|
|
|
1912
2047
|
|
|
1913
2048
|
|
|
1914
2049
|
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
<dt class="tag-source">Source:</dt>
|
|
1918
|
-
<dd class="tag-source"><ul class="dummy"><li>
|
|
1919
|
-
<a href="src_csvToJsonAsync.js.html">src/csvToJsonAsync.js</a>, <a href="src_csvToJsonAsync.js.html#line66">line 66</a>
|
|
1920
|
-
</li></ul></dd>
|
|
1921
2050
|
|
|
1922
2051
|
|
|
1923
2052
|
|
|
1924
2053
|
|
|
1925
2054
|
|
|
1926
2055
|
|
|
2056
|
+
|
|
2057
|
+
<p class="tag-source">
|
|
2058
|
+
<a href="src_csvToJsonAsync.js.html" class="button">View Source</a>
|
|
2059
|
+
<span>
|
|
2060
|
+
<a href="src_csvToJsonAsync.js.html">src/csvToJsonAsync.js</a>, <a href="src_csvToJsonAsync.js.html#line67">line 67</a>
|
|
2061
|
+
</span>
|
|
2062
|
+
</p>
|
|
1927
2063
|
|
|
1928
2064
|
</dl>
|
|
1929
2065
|
|
|
@@ -1941,114 +2077,125 @@ console.log(data);</code></pre>
|
|
|
1941
2077
|
|
|
1942
2078
|
|
|
1943
2079
|
|
|
1944
|
-
<h5>Returns:</h5>
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
<div class="param-desc">
|
|
1948
|
-
<p>For method chaining</p>
|
|
1949
|
-
</div>
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
<dl>
|
|
1954
|
-
<dt>
|
|
1955
|
-
Type
|
|
1956
|
-
</dt>
|
|
1957
|
-
<dd>
|
|
1958
|
-
|
|
1959
|
-
<span class="param-type">this</span>
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
</dd>
|
|
1963
|
-
</dl>
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
2080
|
|
|
1969
2081
|
|
|
1970
2082
|
|
|
1971
|
-
|
|
2083
|
+
<div class='columns method-parameter'>
|
|
2084
|
+
<div class="column is-2"><label>Returns:</label></div>
|
|
2085
|
+
<div class="column is-10">
|
|
1972
2086
|
|
|
2087
|
+
|
|
1973
2088
|
|
|
2089
|
+
<div class="columns">
|
|
1974
2090
|
|
|
1975
|
-
|
|
2091
|
+
<div class='param-desc column is-7'><p>For method chaining</p></div>
|
|
1976
2092
|
|
|
1977
|
-
<h4 class="name" id="mapRows"><span class="type-signature"></span>mapRows<span class="signature">(mapperFn)</span><span class="type-signature"> → {this}</span></h4>
|
|
1978
2093
|
|
|
2094
|
+
<div class='column is-5 has-text-left'>
|
|
2095
|
+
<label>Type: </label>
|
|
2096
|
+
|
|
2097
|
+
<code class="param-type">this</code>
|
|
1979
2098
|
|
|
1980
|
-
|
|
1981
2099
|
|
|
2100
|
+
</div>
|
|
2101
|
+
|
|
2102
|
+
</div>
|
|
1982
2103
|
|
|
2104
|
+
|
|
2105
|
+
</div>
|
|
2106
|
+
</div>
|
|
1983
2107
|
|
|
1984
|
-
<div class="description">
|
|
1985
|
-
<p>Set a mapper function to transform each row after conversion</p>
|
|
1986
|
-
</div>
|
|
1987
2108
|
|
|
1988
2109
|
|
|
1989
2110
|
|
|
2111
|
+
</div>
|
|
2112
|
+
|
|
2113
|
+
<div class="member">
|
|
1990
2114
|
|
|
1991
2115
|
|
|
2116
|
+
|
|
2117
|
+
<h4 class="name" id="mapRows">
|
|
2118
|
+
<a class="href-link" href="#mapRows">#</a>
|
|
2119
|
+
|
|
2120
|
+
<span class="code-name">
|
|
2121
|
+
|
|
2122
|
+
mapRows<span class="signature">(mapperFn)</span><span class="type-signature"> → {this}</span>
|
|
2123
|
+
|
|
2124
|
+
</span>
|
|
2125
|
+
</h4>
|
|
2126
|
+
|
|
1992
2127
|
|
|
2128
|
+
|
|
2129
|
+
|
|
2130
|
+
<div class="description">
|
|
2131
|
+
<p>Set a mapper function to transform each row after conversion</p>
|
|
2132
|
+
</div>
|
|
2133
|
+
|
|
1993
2134
|
|
|
1994
2135
|
|
|
1995
2136
|
|
|
1996
|
-
<h5>Parameters:</h5>
|
|
1997
|
-
|
|
1998
2137
|
|
|
1999
|
-
<table class="params">
|
|
2000
|
-
<thead>
|
|
2001
|
-
<tr>
|
|
2002
|
-
|
|
2003
|
-
<th>Name</th>
|
|
2004
|
-
|
|
2005
2138
|
|
|
2006
|
-
<th>Type</th>
|
|
2007
2139
|
|
|
2008
|
-
|
|
2009
2140
|
|
|
2010
|
-
|
|
2011
2141
|
|
|
2012
|
-
<th class="last">Description</th>
|
|
2013
|
-
</tr>
|
|
2014
|
-
</thead>
|
|
2015
2142
|
|
|
2016
|
-
<
|
|
2143
|
+
<h5>Parameters:</h5>
|
|
2017
2144
|
|
|
2018
|
-
|
|
2145
|
+
<div class="table-container">
|
|
2146
|
+
<table class="params table">
|
|
2147
|
+
<thead>
|
|
2019
2148
|
<tr>
|
|
2020
2149
|
|
|
2021
|
-
|
|
2150
|
+
<th>Name</th>
|
|
2022
2151
|
|
|
2023
2152
|
|
|
2024
|
-
<
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
<span class="param-type">function</span>
|
|
2028
|
-
|
|
2153
|
+
<th>Type</th>
|
|
2029
2154
|
|
|
2030
2155
|
|
|
2031
|
-
</td>
|
|
2032
2156
|
|
|
2033
2157
|
|
|
2034
2158
|
|
|
2159
|
+
<th class="last">Description</th>
|
|
2160
|
+
</tr>
|
|
2161
|
+
</thead>
|
|
2162
|
+
|
|
2163
|
+
<tbody>
|
|
2164
|
+
|
|
2165
|
+
|
|
2035
2166
|
|
|
2167
|
+
<tr class="deep-level-0">
|
|
2168
|
+
|
|
2169
|
+
<td class="name"><code>mapperFn</code></td>
|
|
2170
|
+
|
|
2036
2171
|
|
|
2037
|
-
|
|
2038
|
-
|
|
2172
|
+
<td class="type">
|
|
2173
|
+
|
|
2174
|
+
|
|
2175
|
+
<code class="param-type">function</code>
|
|
2039
2176
|
|
|
2040
|
-
|
|
2041
|
-
</tbody>
|
|
2042
|
-
</table>
|
|
2043
2177
|
|
|
2178
|
+
|
|
2179
|
+
</td>
|
|
2044
2180
|
|
|
2181
|
+
|
|
2045
2182
|
|
|
2183
|
+
|
|
2184
|
+
|
|
2185
|
+
<td class="description last"><p>Function receiving (row, index) that returns transformed row or null to filter</p></td>
|
|
2186
|
+
</tr>
|
|
2187
|
+
|
|
2188
|
+
|
|
2189
|
+
|
|
2190
|
+
</tbody>
|
|
2191
|
+
</table>
|
|
2192
|
+
</div>
|
|
2046
2193
|
|
|
2047
2194
|
|
|
2048
2195
|
|
|
2049
|
-
<dl class="details">
|
|
2050
2196
|
|
|
2051
|
-
|
|
2197
|
+
|
|
2198
|
+
<dl class="details">
|
|
2052
2199
|
|
|
2053
2200
|
|
|
2054
2201
|
|
|
@@ -2073,16 +2220,19 @@ console.log(data);</code></pre>
|
|
|
2073
2220
|
|
|
2074
2221
|
|
|
2075
2222
|
|
|
2076
|
-
<dt class="tag-source">Source:</dt>
|
|
2077
|
-
<dd class="tag-source"><ul class="dummy"><li>
|
|
2078
|
-
<a href="src_csvToJsonAsync.js.html">src/csvToJsonAsync.js</a>, <a href="src_csvToJsonAsync.js.html#line87">line 87</a>
|
|
2079
|
-
</li></ul></dd>
|
|
2080
2223
|
|
|
2081
2224
|
|
|
2082
2225
|
|
|
2083
2226
|
|
|
2084
2227
|
|
|
2085
2228
|
|
|
2229
|
+
|
|
2230
|
+
<p class="tag-source">
|
|
2231
|
+
<a href="src_csvToJsonAsync.js.html" class="button">View Source</a>
|
|
2232
|
+
<span>
|
|
2233
|
+
<a href="src_csvToJsonAsync.js.html">src/csvToJsonAsync.js</a>, <a href="src_csvToJsonAsync.js.html#line88">line 88</a>
|
|
2234
|
+
</span>
|
|
2235
|
+
</p>
|
|
2086
2236
|
|
|
2087
2237
|
</dl>
|
|
2088
2238
|
|
|
@@ -2100,52 +2250,63 @@ console.log(data);</code></pre>
|
|
|
2100
2250
|
|
|
2101
2251
|
|
|
2102
2252
|
|
|
2103
|
-
<h5>Returns:</h5>
|
|
2104
2253
|
|
|
2105
|
-
|
|
2106
|
-
<div class="param-desc">
|
|
2107
|
-
<p>For method chaining</p>
|
|
2108
|
-
</div>
|
|
2109
2254
|
|
|
2110
2255
|
|
|
2256
|
+
<div class='columns method-parameter'>
|
|
2257
|
+
<div class="column is-2"><label>Returns:</label></div>
|
|
2258
|
+
<div class="column is-10">
|
|
2259
|
+
|
|
2260
|
+
|
|
2111
2261
|
|
|
2112
|
-
<
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2262
|
+
<div class="columns">
|
|
2263
|
+
|
|
2264
|
+
<div class='param-desc column is-7'><p>For method chaining</p></div>
|
|
2265
|
+
|
|
2266
|
+
|
|
2267
|
+
<div class='column is-5 has-text-left'>
|
|
2268
|
+
<label>Type: </label>
|
|
2117
2269
|
|
|
2118
|
-
<
|
|
2119
|
-
|
|
2270
|
+
<code class="param-type">this</code>
|
|
2120
2271
|
|
|
2121
|
-
</dd>
|
|
2122
|
-
</dl>
|
|
2123
2272
|
|
|
2273
|
+
</div>
|
|
2124
2274
|
|
|
2275
|
+
</div>
|
|
2276
|
+
|
|
2277
|
+
|
|
2278
|
+
</div>
|
|
2279
|
+
</div>
|
|
2280
|
+
|
|
2125
2281
|
|
|
2126
2282
|
|
|
2127
2283
|
|
|
2284
|
+
</div>
|
|
2285
|
+
|
|
2286
|
+
<div class="member">
|
|
2128
2287
|
|
|
2129
2288
|
|
|
2289
|
+
|
|
2290
|
+
<h4 class="name" id="parseSubArray">
|
|
2291
|
+
<a class="href-link" href="#parseSubArray">#</a>
|
|
2130
2292
|
|
|
2293
|
+
<span class="code-name">
|
|
2131
2294
|
|
|
2132
|
-
|
|
2295
|
+
parseSubArray<span class="signature">(delimiter, separator)</span><span class="type-signature"> → {this}</span>
|
|
2296
|
+
|
|
2297
|
+
</span>
|
|
2298
|
+
</h4>
|
|
2133
2299
|
|
|
2134
2300
|
|
|
2135
2301
|
|
|
2136
|
-
<h4 class="name" id="parseSubArray"><span class="type-signature"></span>parseSubArray<span class="signature">(delimiter, separator)</span><span class="type-signature"> → {this}</span></h4>
|
|
2137
2302
|
|
|
2138
|
-
|
|
2303
|
+
<div class="description">
|
|
2304
|
+
<p>Configure sub-array parsing for special field values</p>
|
|
2305
|
+
</div>
|
|
2139
2306
|
|
|
2140
2307
|
|
|
2141
2308
|
|
|
2142
2309
|
|
|
2143
|
-
<div class="description">
|
|
2144
|
-
<p>Configure sub-array parsing for special field values</p>
|
|
2145
|
-
</div>
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
2310
|
|
|
2150
2311
|
|
|
2151
2312
|
|
|
@@ -2154,97 +2315,99 @@ console.log(data);</code></pre>
|
|
|
2154
2315
|
|
|
2155
2316
|
<h5>Parameters:</h5>
|
|
2156
2317
|
|
|
2318
|
+
<div class="table-container">
|
|
2319
|
+
<table class="params table">
|
|
2320
|
+
<thead>
|
|
2321
|
+
<tr>
|
|
2322
|
+
|
|
2323
|
+
<th>Name</th>
|
|
2324
|
+
|
|
2157
2325
|
|
|
2158
|
-
<
|
|
2159
|
-
<thead>
|
|
2160
|
-
<tr>
|
|
2161
|
-
|
|
2162
|
-
<th>Name</th>
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
<th>Type</th>
|
|
2326
|
+
<th>Type</th>
|
|
2166
2327
|
|
|
2167
|
-
|
|
2328
|
+
|
|
2168
2329
|
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2330
|
+
|
|
2331
|
+
<th>Default</th>
|
|
2332
|
+
|
|
2172
2333
|
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2334
|
+
<th class="last">Description</th>
|
|
2335
|
+
</tr>
|
|
2336
|
+
</thead>
|
|
2176
2337
|
|
|
2177
|
-
|
|
2178
|
-
|
|
2338
|
+
<tbody>
|
|
2339
|
+
|
|
2179
2340
|
|
|
2180
|
-
<tr>
|
|
2181
|
-
|
|
2182
|
-
<td class="name"><code>delimiter</code></td>
|
|
2183
2341
|
|
|
2342
|
+
<tr class="deep-level-0">
|
|
2343
|
+
|
|
2344
|
+
<td class="name"><code>delimiter</code></td>
|
|
2345
|
+
|
|
2184
2346
|
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
<
|
|
2347
|
+
<td class="type">
|
|
2348
|
+
|
|
2349
|
+
|
|
2350
|
+
<code class="param-type">string</code>
|
|
2189
2351
|
|
|
2190
2352
|
|
|
2191
|
-
|
|
2192
|
-
|
|
2353
|
+
|
|
2354
|
+
</td>
|
|
2193
2355
|
|
|
2194
|
-
|
|
2356
|
+
|
|
2195
2357
|
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2358
|
+
|
|
2359
|
+
<td class="default">
|
|
2360
|
+
|
|
2361
|
+
*
|
|
2362
|
+
|
|
2363
|
+
</td>
|
|
2364
|
+
|
|
2203
2365
|
|
|
2204
|
-
|
|
2205
|
-
|
|
2366
|
+
<td class="description last"><p>Bracket character (default: '*')</p></td>
|
|
2367
|
+
</tr>
|
|
2206
2368
|
|
|
2207
|
-
|
|
2208
2369
|
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
<td class="name"><code>separator</code></td>
|
|
2212
|
-
|
|
2370
|
+
|
|
2213
2371
|
|
|
2214
|
-
<td class="type">
|
|
2215
2372
|
|
|
2216
|
-
|
|
2217
|
-
|
|
2373
|
+
<tr class="deep-level-0">
|
|
2374
|
+
|
|
2375
|
+
<td class="name"><code>separator</code></td>
|
|
2376
|
+
|
|
2218
2377
|
|
|
2378
|
+
<td class="type">
|
|
2379
|
+
|
|
2380
|
+
|
|
2381
|
+
<code class="param-type">string</code>
|
|
2219
2382
|
|
|
2220
|
-
|
|
2221
|
-
</td>
|
|
2222
2383
|
|
|
2223
|
-
|
|
2384
|
+
|
|
2385
|
+
</td>
|
|
2224
2386
|
|
|
2225
|
-
|
|
2226
|
-
<td class="default">
|
|
2227
|
-
|
|
2228
|
-
,
|
|
2229
|
-
|
|
2230
|
-
</td>
|
|
2231
|
-
|
|
2387
|
+
|
|
2232
2388
|
|
|
2233
|
-
|
|
2234
|
-
|
|
2389
|
+
|
|
2390
|
+
<td class="default">
|
|
2391
|
+
|
|
2392
|
+
,
|
|
2393
|
+
|
|
2394
|
+
</td>
|
|
2395
|
+
|
|
2235
2396
|
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
</table>
|
|
2397
|
+
<td class="description last"><p>Item separator within brackets (default: ',')</p></td>
|
|
2398
|
+
</tr>
|
|
2239
2399
|
|
|
2240
2400
|
|
|
2401
|
+
|
|
2402
|
+
</tbody>
|
|
2403
|
+
</table>
|
|
2404
|
+
</div>
|
|
2241
2405
|
|
|
2242
2406
|
|
|
2243
2407
|
|
|
2244
2408
|
|
|
2245
|
-
<dl class="details">
|
|
2246
2409
|
|
|
2247
|
-
|
|
2410
|
+
<dl class="details">
|
|
2248
2411
|
|
|
2249
2412
|
|
|
2250
2413
|
|
|
@@ -2269,16 +2432,19 @@ console.log(data);</code></pre>
|
|
|
2269
2432
|
|
|
2270
2433
|
|
|
2271
2434
|
|
|
2272
|
-
<dt class="tag-source">Source:</dt>
|
|
2273
|
-
<dd class="tag-source"><ul class="dummy"><li>
|
|
2274
|
-
<a href="src_csvToJsonAsync.js.html">src/csvToJsonAsync.js</a>, <a href="src_csvToJsonAsync.js.html#line77">line 77</a>
|
|
2275
|
-
</li></ul></dd>
|
|
2276
2435
|
|
|
2277
2436
|
|
|
2278
2437
|
|
|
2279
2438
|
|
|
2280
2439
|
|
|
2281
2440
|
|
|
2441
|
+
|
|
2442
|
+
<p class="tag-source">
|
|
2443
|
+
<a href="src_csvToJsonAsync.js.html" class="button">View Source</a>
|
|
2444
|
+
<span>
|
|
2445
|
+
<a href="src_csvToJsonAsync.js.html">src/csvToJsonAsync.js</a>, <a href="src_csvToJsonAsync.js.html#line78">line 78</a>
|
|
2446
|
+
</span>
|
|
2447
|
+
</p>
|
|
2282
2448
|
|
|
2283
2449
|
</dl>
|
|
2284
2450
|
|
|
@@ -2296,49 +2462,60 @@ console.log(data);</code></pre>
|
|
|
2296
2462
|
|
|
2297
2463
|
|
|
2298
2464
|
|
|
2299
|
-
<h5>Returns:</h5>
|
|
2300
2465
|
|
|
2301
|
-
|
|
2302
|
-
<div class="param-desc">
|
|
2303
|
-
<p>For method chaining</p>
|
|
2304
|
-
</div>
|
|
2305
2466
|
|
|
2306
2467
|
|
|
2468
|
+
<div class='columns method-parameter'>
|
|
2469
|
+
<div class="column is-2"><label>Returns:</label></div>
|
|
2470
|
+
<div class="column is-10">
|
|
2471
|
+
|
|
2472
|
+
|
|
2307
2473
|
|
|
2308
|
-
<
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2474
|
+
<div class="columns">
|
|
2475
|
+
|
|
2476
|
+
<div class='param-desc column is-7'><p>For method chaining</p></div>
|
|
2477
|
+
|
|
2478
|
+
|
|
2479
|
+
<div class='column is-5 has-text-left'>
|
|
2480
|
+
<label>Type: </label>
|
|
2313
2481
|
|
|
2314
|
-
<
|
|
2315
|
-
|
|
2482
|
+
<code class="param-type">this</code>
|
|
2316
2483
|
|
|
2317
|
-
</dd>
|
|
2318
|
-
</dl>
|
|
2319
2484
|
|
|
2485
|
+
</div>
|
|
2320
2486
|
|
|
2487
|
+
</div>
|
|
2321
2488
|
|
|
2489
|
+
|
|
2490
|
+
</div>
|
|
2491
|
+
</div>
|
|
2322
2492
|
|
|
2323
2493
|
|
|
2324
2494
|
|
|
2325
2495
|
|
|
2326
|
-
|
|
2496
|
+
</div>
|
|
2327
2497
|
|
|
2498
|
+
<div class="member">
|
|
2328
2499
|
|
|
2329
|
-
|
|
2330
2500
|
|
|
2331
2501
|
|
|
2332
|
-
<h4 class="name" id="supportQuotedField"
|
|
2502
|
+
<h4 class="name" id="supportQuotedField">
|
|
2503
|
+
<a class="href-link" href="#supportQuotedField">#</a>
|
|
2504
|
+
|
|
2505
|
+
<span class="code-name">
|
|
2506
|
+
|
|
2507
|
+
supportQuotedField<span class="signature">(active)</span><span class="type-signature"> → {this}</span>
|
|
2508
|
+
|
|
2509
|
+
</span>
|
|
2510
|
+
</h4>
|
|
2333
2511
|
|
|
2334
2512
|
|
|
2335
2513
|
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
</div>
|
|
2514
|
+
|
|
2515
|
+
<div class="description">
|
|
2516
|
+
<p>Enable or disable support for RFC 4180 quoted fields</p>
|
|
2517
|
+
</div>
|
|
2518
|
+
|
|
2342
2519
|
|
|
2343
2520
|
|
|
2344
2521
|
|
|
@@ -2350,52 +2527,54 @@ console.log(data);</code></pre>
|
|
|
2350
2527
|
|
|
2351
2528
|
<h5>Parameters:</h5>
|
|
2352
2529
|
|
|
2530
|
+
<div class="table-container">
|
|
2531
|
+
<table class="params table">
|
|
2532
|
+
<thead>
|
|
2533
|
+
<tr>
|
|
2534
|
+
|
|
2535
|
+
<th>Name</th>
|
|
2536
|
+
|
|
2353
2537
|
|
|
2354
|
-
<
|
|
2355
|
-
<thead>
|
|
2356
|
-
<tr>
|
|
2357
|
-
|
|
2358
|
-
<th>Name</th>
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
<th>Type</th>
|
|
2538
|
+
<th>Type</th>
|
|
2362
2539
|
|
|
2363
|
-
|
|
2540
|
+
|
|
2364
2541
|
|
|
2365
|
-
|
|
2542
|
+
|
|
2366
2543
|
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
|
|
2544
|
+
<th class="last">Description</th>
|
|
2545
|
+
</tr>
|
|
2546
|
+
</thead>
|
|
2370
2547
|
|
|
2371
|
-
|
|
2372
|
-
|
|
2548
|
+
<tbody>
|
|
2549
|
+
|
|
2373
2550
|
|
|
2374
|
-
<tr>
|
|
2375
|
-
|
|
2376
|
-
<td class="name"><code>active</code></td>
|
|
2377
2551
|
|
|
2552
|
+
<tr class="deep-level-0">
|
|
2553
|
+
|
|
2554
|
+
<td class="name"><code>active</code></td>
|
|
2555
|
+
|
|
2378
2556
|
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
<
|
|
2557
|
+
<td class="type">
|
|
2558
|
+
|
|
2559
|
+
|
|
2560
|
+
<code class="param-type">boolean</code>
|
|
2383
2561
|
|
|
2384
2562
|
|
|
2385
|
-
|
|
2386
|
-
|
|
2563
|
+
|
|
2564
|
+
</td>
|
|
2387
2565
|
|
|
2388
|
-
|
|
2566
|
+
|
|
2389
2567
|
|
|
2390
|
-
|
|
2568
|
+
|
|
2391
2569
|
|
|
2392
|
-
|
|
2393
|
-
|
|
2570
|
+
<td class="description last"><p>Whether to support quoted fields</p></td>
|
|
2571
|
+
</tr>
|
|
2394
2572
|
|
|
2395
|
-
|
|
2396
|
-
</tbody>
|
|
2397
|
-
</table>
|
|
2398
2573
|
|
|
2574
|
+
|
|
2575
|
+
</tbody>
|
|
2576
|
+
</table>
|
|
2577
|
+
</div>
|
|
2399
2578
|
|
|
2400
2579
|
|
|
2401
2580
|
|
|
@@ -2426,18 +2605,19 @@ console.log(data);</code></pre>
|
|
|
2426
2605
|
|
|
2427
2606
|
|
|
2428
2607
|
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
<dt class="tag-source">Source:</dt>
|
|
2432
|
-
<dd class="tag-source"><ul class="dummy"><li>
|
|
2433
|
-
<a href="src_csvToJsonAsync.js.html">src/csvToJsonAsync.js</a>, <a href="src_csvToJsonAsync.js.html#line36">line 36</a>
|
|
2434
|
-
</li></ul></dd>
|
|
2435
2608
|
|
|
2436
2609
|
|
|
2437
2610
|
|
|
2438
2611
|
|
|
2439
2612
|
|
|
2440
2613
|
|
|
2614
|
+
|
|
2615
|
+
<p class="tag-source">
|
|
2616
|
+
<a href="src_csvToJsonAsync.js.html" class="button">View Source</a>
|
|
2617
|
+
<span>
|
|
2618
|
+
<a href="src_csvToJsonAsync.js.html">src/csvToJsonAsync.js</a>, <a href="src_csvToJsonAsync.js.html#line37">line 37</a>
|
|
2619
|
+
</span>
|
|
2620
|
+
</p>
|
|
2441
2621
|
|
|
2442
2622
|
</dl>
|
|
2443
2623
|
|
|
@@ -2455,49 +2635,60 @@ console.log(data);</code></pre>
|
|
|
2455
2635
|
|
|
2456
2636
|
|
|
2457
2637
|
|
|
2458
|
-
<h5>Returns:</h5>
|
|
2459
2638
|
|
|
2460
|
-
|
|
2461
|
-
<div class="param-desc">
|
|
2462
|
-
<p>For method chaining</p>
|
|
2463
|
-
</div>
|
|
2464
2639
|
|
|
2465
2640
|
|
|
2641
|
+
<div class='columns method-parameter'>
|
|
2642
|
+
<div class="column is-2"><label>Returns:</label></div>
|
|
2643
|
+
<div class="column is-10">
|
|
2644
|
+
|
|
2645
|
+
|
|
2466
2646
|
|
|
2467
|
-
<
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
2647
|
+
<div class="columns">
|
|
2648
|
+
|
|
2649
|
+
<div class='param-desc column is-7'><p>For method chaining</p></div>
|
|
2650
|
+
|
|
2651
|
+
|
|
2652
|
+
<div class='column is-5 has-text-left'>
|
|
2653
|
+
<label>Type: </label>
|
|
2472
2654
|
|
|
2473
|
-
<
|
|
2655
|
+
<code class="param-type">this</code>
|
|
2474
2656
|
|
|
2475
2657
|
|
|
2476
|
-
</
|
|
2477
|
-
</dl>
|
|
2478
|
-
|
|
2658
|
+
</div>
|
|
2479
2659
|
|
|
2660
|
+
</div>
|
|
2480
2661
|
|
|
2662
|
+
|
|
2663
|
+
</div>
|
|
2664
|
+
</div>
|
|
2481
2665
|
|
|
2482
2666
|
|
|
2483
2667
|
|
|
2484
2668
|
|
|
2485
|
-
|
|
2669
|
+
</div>
|
|
2486
2670
|
|
|
2671
|
+
<div class="member">
|
|
2487
2672
|
|
|
2488
|
-
|
|
2489
2673
|
|
|
2490
2674
|
|
|
2491
|
-
<h4 class="name" id="trimHeaderFieldWhiteSpace"
|
|
2675
|
+
<h4 class="name" id="trimHeaderFieldWhiteSpace">
|
|
2676
|
+
<a class="href-link" href="#trimHeaderFieldWhiteSpace">#</a>
|
|
2677
|
+
|
|
2678
|
+
<span class="code-name">
|
|
2679
|
+
|
|
2680
|
+
trimHeaderFieldWhiteSpace<span class="signature">(active)</span><span class="type-signature"> → {this}</span>
|
|
2681
|
+
|
|
2682
|
+
</span>
|
|
2683
|
+
</h4>
|
|
2492
2684
|
|
|
2493
2685
|
|
|
2494
2686
|
|
|
2495
|
-
|
|
2496
|
-
|
|
2497
|
-
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
</div>
|
|
2687
|
+
|
|
2688
|
+
<div class="description">
|
|
2689
|
+
<p>Configure whitespace handling in header field names</p>
|
|
2690
|
+
</div>
|
|
2691
|
+
|
|
2501
2692
|
|
|
2502
2693
|
|
|
2503
2694
|
|
|
@@ -2509,52 +2700,54 @@ console.log(data);</code></pre>
|
|
|
2509
2700
|
|
|
2510
2701
|
<h5>Parameters:</h5>
|
|
2511
2702
|
|
|
2703
|
+
<div class="table-container">
|
|
2704
|
+
<table class="params table">
|
|
2705
|
+
<thead>
|
|
2706
|
+
<tr>
|
|
2707
|
+
|
|
2708
|
+
<th>Name</th>
|
|
2709
|
+
|
|
2512
2710
|
|
|
2513
|
-
<
|
|
2514
|
-
<thead>
|
|
2515
|
-
<tr>
|
|
2516
|
-
|
|
2517
|
-
<th>Name</th>
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
<th>Type</th>
|
|
2711
|
+
<th>Type</th>
|
|
2521
2712
|
|
|
2522
|
-
|
|
2713
|
+
|
|
2523
2714
|
|
|
2524
|
-
|
|
2715
|
+
|
|
2525
2716
|
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
|
|
2717
|
+
<th class="last">Description</th>
|
|
2718
|
+
</tr>
|
|
2719
|
+
</thead>
|
|
2529
2720
|
|
|
2530
|
-
|
|
2531
|
-
|
|
2721
|
+
<tbody>
|
|
2722
|
+
|
|
2532
2723
|
|
|
2533
|
-
<tr>
|
|
2534
|
-
|
|
2535
|
-
<td class="name"><code>active</code></td>
|
|
2536
2724
|
|
|
2725
|
+
<tr class="deep-level-0">
|
|
2726
|
+
|
|
2727
|
+
<td class="name"><code>active</code></td>
|
|
2728
|
+
|
|
2537
2729
|
|
|
2538
|
-
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
<
|
|
2730
|
+
<td class="type">
|
|
2731
|
+
|
|
2732
|
+
|
|
2733
|
+
<code class="param-type">boolean</code>
|
|
2542
2734
|
|
|
2543
2735
|
|
|
2544
|
-
|
|
2545
|
-
|
|
2736
|
+
|
|
2737
|
+
</td>
|
|
2546
2738
|
|
|
2547
|
-
|
|
2739
|
+
|
|
2548
2740
|
|
|
2549
|
-
|
|
2741
|
+
|
|
2550
2742
|
|
|
2551
|
-
|
|
2552
|
-
|
|
2743
|
+
<td class="description last"><p>If true, removes all whitespace; if false, only trims edges</p></td>
|
|
2744
|
+
</tr>
|
|
2553
2745
|
|
|
2554
|
-
|
|
2555
|
-
</tbody>
|
|
2556
|
-
</table>
|
|
2557
2746
|
|
|
2747
|
+
|
|
2748
|
+
</tbody>
|
|
2749
|
+
</table>
|
|
2750
|
+
</div>
|
|
2558
2751
|
|
|
2559
2752
|
|
|
2560
2753
|
|
|
@@ -2585,18 +2778,19 @@ console.log(data);</code></pre>
|
|
|
2585
2778
|
|
|
2586
2779
|
|
|
2587
2780
|
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
<dt class="tag-source">Source:</dt>
|
|
2591
|
-
<dd class="tag-source"><ul class="dummy"><li>
|
|
2592
|
-
<a href="src_csvToJsonAsync.js.html">src/csvToJsonAsync.js</a>, <a href="src_csvToJsonAsync.js.html#line56">line 56</a>
|
|
2593
|
-
</li></ul></dd>
|
|
2594
2781
|
|
|
2595
2782
|
|
|
2596
2783
|
|
|
2597
2784
|
|
|
2598
2785
|
|
|
2599
2786
|
|
|
2787
|
+
|
|
2788
|
+
<p class="tag-source">
|
|
2789
|
+
<a href="src_csvToJsonAsync.js.html" class="button">View Source</a>
|
|
2790
|
+
<span>
|
|
2791
|
+
<a href="src_csvToJsonAsync.js.html">src/csvToJsonAsync.js</a>, <a href="src_csvToJsonAsync.js.html#line57">line 57</a>
|
|
2792
|
+
</span>
|
|
2793
|
+
</p>
|
|
2600
2794
|
|
|
2601
2795
|
</dl>
|
|
2602
2796
|
|
|
@@ -2614,34 +2808,41 @@ console.log(data);</code></pre>
|
|
|
2614
2808
|
|
|
2615
2809
|
|
|
2616
2810
|
|
|
2617
|
-
<h5>Returns:</h5>
|
|
2618
2811
|
|
|
2619
|
-
|
|
2620
|
-
<div class="param-desc">
|
|
2621
|
-
<p>For method chaining</p>
|
|
2622
|
-
</div>
|
|
2623
2812
|
|
|
2624
2813
|
|
|
2814
|
+
<div class='columns method-parameter'>
|
|
2815
|
+
<div class="column is-2"><label>Returns:</label></div>
|
|
2816
|
+
<div class="column is-10">
|
|
2817
|
+
|
|
2818
|
+
|
|
2625
2819
|
|
|
2626
|
-
<
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
|
|
2820
|
+
<div class="columns">
|
|
2821
|
+
|
|
2822
|
+
<div class='param-desc column is-7'><p>For method chaining</p></div>
|
|
2823
|
+
|
|
2824
|
+
|
|
2825
|
+
<div class='column is-5 has-text-left'>
|
|
2826
|
+
<label>Type: </label>
|
|
2631
2827
|
|
|
2632
|
-
<
|
|
2633
|
-
|
|
2828
|
+
<code class="param-type">this</code>
|
|
2634
2829
|
|
|
2635
|
-
</dd>
|
|
2636
|
-
</dl>
|
|
2637
2830
|
|
|
2831
|
+
</div>
|
|
2638
2832
|
|
|
2833
|
+
</div>
|
|
2639
2834
|
|
|
2835
|
+
|
|
2836
|
+
</div>
|
|
2837
|
+
</div>
|
|
2640
2838
|
|
|
2641
2839
|
|
|
2642
2840
|
|
|
2643
2841
|
|
|
2644
|
-
|
|
2842
|
+
</div>
|
|
2843
|
+
|
|
2844
|
+
</div>
|
|
2845
|
+
</div>
|
|
2645
2846
|
|
|
2646
2847
|
|
|
2647
2848
|
|
|
@@ -2654,19 +2855,26 @@ console.log(data);</code></pre>
|
|
|
2654
2855
|
|
|
2655
2856
|
|
|
2656
2857
|
|
|
2657
|
-
</div>
|
|
2658
|
-
|
|
2659
|
-
<
|
|
2660
|
-
|
|
2661
|
-
</
|
|
2662
|
-
|
|
2663
|
-
<
|
|
2858
|
+
</div>
|
|
2859
|
+
|
|
2860
|
+
<footer class="footer">
|
|
2861
|
+
<div class="content has-text-centered">
|
|
2862
|
+
<p>Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.5</a></p>
|
|
2863
|
+
<p class="sidebar-created-by">
|
|
2864
|
+
<a href="https://github.com/SoftwareBrothers/better-docs" target="_blank">BetterDocs theme</a> provided with <i class="fas fa-heart"></i> by
|
|
2865
|
+
<a href="http://softwarebrothers.co" target="_blank">SoftwareBrothers - JavaScript Development Agency</a>
|
|
2866
|
+
</p>
|
|
2867
|
+
</div>
|
|
2868
|
+
</footer>
|
|
2869
|
+
|
|
2870
|
+
</div>
|
|
2871
|
+
<div id="side-nav" class="side-nav">
|
|
2872
|
+
</div>
|
|
2873
|
+
</div>
|
|
2874
|
+
<script src="scripts/app.min.js"></script>
|
|
2875
|
+
<script>PR.prettyPrint();</script>
|
|
2876
|
+
<script src="scripts/linenumber.js"> </script>
|
|
2664
2877
|
|
|
2665
|
-
<footer>
|
|
2666
|
-
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)
|
|
2667
|
-
</footer>
|
|
2668
2878
|
|
|
2669
|
-
<script> prettyPrint(); </script>
|
|
2670
|
-
<script src="scripts/linenumber.js"> </script>
|
|
2671
2879
|
</body>
|
|
2672
2880
|
</html>
|