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