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