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.
Files changed (65) hide show
  1. package/.github/workflows/ci-cd.yml +1 -1
  2. package/docs/api/BrowserApi.html +1255 -1028
  3. package/docs/api/BrowserApiError.html +326 -179
  4. package/docs/api/ConfigurationError.html +375 -224
  5. package/docs/api/CsvFormatError.html +334 -187
  6. package/docs/api/CsvParsingError.html +259 -132
  7. package/docs/api/CsvToJson.html +1545 -1314
  8. package/docs/api/CsvToJsonAsync.html +1356 -1148
  9. package/docs/api/FileOperationError.html +213 -101
  10. package/docs/api/FileUtils.html +568 -430
  11. package/docs/api/InputValidationError.html +229 -115
  12. package/docs/api/JsonUtil.html +222 -110
  13. package/docs/api/JsonValidationError.html +197 -87
  14. package/docs/api/StringUtils.html +833 -0
  15. package/docs/api/global.html +1537 -1354
  16. package/docs/api/index.html +114 -26
  17. package/docs/api/index.js.html +137 -31
  18. package/docs/api/scripts/app.min.js +1 -0
  19. package/docs/api/scripts/linenumber.js +10 -9
  20. package/docs/api/scripts/search.js +39 -0
  21. package/docs/api/src_browserApi.js.html +120 -29
  22. package/docs/api/src_csvToJson.js.html +119 -28
  23. package/docs/api/src_csvToJsonAsync.js.html +118 -27
  24. package/docs/api/src_util_errors.js.html +126 -28
  25. package/docs/api/src_util_fileUtils.js.html +117 -26
  26. package/docs/api/src_util_jsonUtils.js.html +117 -26
  27. package/docs/api/src_util_stringUtils.js.html +121 -27
  28. package/docs/api/styles/app.min.css +1 -0
  29. package/docs/api/styles/iframe.css +13 -0
  30. package/docs/api/styles/reset.css +44 -0
  31. package/eslint.config.js +115 -0
  32. package/index.js +21 -5
  33. package/jsdoc.json +29 -4
  34. package/package.json +5 -3
  35. package/src/browserApi.js +4 -3
  36. package/src/csvToJson.js +3 -2
  37. package/src/csvToJsonAsync.js +2 -1
  38. package/src/util/errors.js +10 -2
  39. package/src/util/fileUtils.js +1 -0
  40. package/src/util/jsonUtils.js +1 -0
  41. package/src/util/stringUtils.js +5 -1
  42. package/.eslintignore +0 -3
  43. package/.eslintrc.json +0 -48
  44. package/docs/api/fonts/OpenSans-Bold-webfont.eot +0 -0
  45. package/docs/api/fonts/OpenSans-Bold-webfont.svg +0 -1830
  46. package/docs/api/fonts/OpenSans-Bold-webfont.woff +0 -0
  47. package/docs/api/fonts/OpenSans-BoldItalic-webfont.eot +0 -0
  48. package/docs/api/fonts/OpenSans-BoldItalic-webfont.svg +0 -1830
  49. package/docs/api/fonts/OpenSans-BoldItalic-webfont.woff +0 -0
  50. package/docs/api/fonts/OpenSans-Italic-webfont.eot +0 -0
  51. package/docs/api/fonts/OpenSans-Italic-webfont.svg +0 -1830
  52. package/docs/api/fonts/OpenSans-Italic-webfont.woff +0 -0
  53. package/docs/api/fonts/OpenSans-Light-webfont.eot +0 -0
  54. package/docs/api/fonts/OpenSans-Light-webfont.svg +0 -1831
  55. package/docs/api/fonts/OpenSans-Light-webfont.woff +0 -0
  56. package/docs/api/fonts/OpenSans-LightItalic-webfont.eot +0 -0
  57. package/docs/api/fonts/OpenSans-LightItalic-webfont.svg +0 -1835
  58. package/docs/api/fonts/OpenSans-LightItalic-webfont.woff +0 -0
  59. package/docs/api/fonts/OpenSans-Regular-webfont.eot +0 -0
  60. package/docs/api/fonts/OpenSans-Regular-webfont.svg +0 -1831
  61. package/docs/api/fonts/OpenSans-Regular-webfont.woff +0 -0
  62. package/docs/api/scripts/prettify/Apache-License-2.0.txt +0 -202
  63. package/docs/api/scripts/prettify/lang-css.js +0 -2
  64. package/docs/api/scripts/prettify/prettify.js +0 -28
  65. package/docs/api/styles/jsdoc-default.css +0 -358
@@ -1,26 +1,107 @@
1
1
  <!DOCTYPE html>
2
2
  <html lang="en">
3
+
3
4
  <head>
4
- <meta charset="utf-8">
5
- <title>JSDoc: Class: FileUtils</title>
6
-
7
- <script src="scripts/prettify/prettify.js"> </script>
8
- <script src="scripts/prettify/lang-css.js"> </script>
9
- <!--[if lt IE 9]>
10
- <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
11
- <![endif]-->
12
- <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
13
- <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
5
+
6
+ <meta charset="utf-8">
7
+ <meta name="viewport" content="width=device-width, initial-scale=1">
8
+ <title> FileUtils</title>
9
+
10
+ <script src="https://cdn.jsdelivr.net/gh/google/code-prettify@master/loader/run_prettify.js"></script>
11
+ <script src="https://unpkg.com/@babel/standalone/babel.min.js"></script>
12
+ <script src="./build/entry.js"></script>
13
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
14
+ <!--[if lt IE 9]>
15
+ <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
16
+ <![endif]-->
17
+ <link href="https://fonts.googleapis.com/css?family=Roboto:100,400,700|Inconsolata,700" rel="stylesheet">
18
+ <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.6.3/css/all.css" integrity="sha384-UHRtZLI+pbxtHCWp1t77Bi1L4ZtiqrqD80Kn4Z8NTSRyMA2Fd33n5dQ8lWUE00s/" crossorigin="anonymous">
19
+ <link type="text/css" rel="stylesheet" href="https://jmblog.github.io/color-themes-for-google-code-prettify/themes/tomorrow-night.min.css">
20
+ <link type="text/css" rel="stylesheet" href="styles/app.min.css">
21
+ <link type="text/css" rel="stylesheet" href="styles/iframe.css">
22
+ <link type="text/css" rel="stylesheet" href="./node_modules/better-docs/css/better-docs.css">
23
+ <script async defer src="https://buttons.github.io/buttons.js"></script>
24
+
25
+
14
26
  </head>
15
27
 
16
- <body>
17
-
18
- <div id="main">
19
28
 
20
- <h1 class="page-title">Class: FileUtils</h1>
21
29
 
30
+ <body class="layout small-header">
31
+ <div id="stickyNavbarOverlay"></div>
22
32
 
23
33
 
34
+ <div class="top-nav">
35
+ <div class="inner">
36
+ <a id="hamburger" role="button" class="navbar-burger" aria-label="menu" aria-expanded="false">
37
+ <span aria-hidden="true"></span>
38
+ <span aria-hidden="true"></span>
39
+ <span aria-hidden="true"></span>
40
+ </a>
41
+ <div class="logo">
42
+
43
+ <a class="image" href="index.html">
44
+ <img src="https://raw.githubusercontent.com/iuccio/CSVtoJSON/master/CSVtoJSON.png" alt="logo">
45
+ </a>
46
+
47
+
48
+ <a href="index.html">
49
+ <h1 class="navbar-item">Convert CSV to JSON</h1>
50
+ </a>
51
+
52
+ </div>
53
+ <div class="menu">
54
+
55
+ <div class="navigation">
56
+ <a
57
+ href="index.html"
58
+ class="link"
59
+ >
60
+ Documentation
61
+ </a>
62
+
63
+
64
+
65
+ <a
66
+ class="link user-link "
67
+ href="https://github.com/iuccio/CSVtoJSON"
68
+ >
69
+ GitHub
70
+ </a>
71
+
72
+ <a
73
+ class="link user-link "
74
+ href="https://www.npmjs.com/package/convert-csv-to-json"
75
+ >
76
+ NPM
77
+ </a>
78
+
79
+
80
+
81
+ </div>
82
+ </div>
83
+ </div>
84
+ </div>
85
+ <div id="main">
86
+ <div
87
+ class="sidebar "
88
+ id="sidebarNav"
89
+ >
90
+
91
+ <nav>
92
+
93
+ <h2><a href="index.html">Documentation</a></h2><div class="category"></div><div class="category"><h2>1-Core API</h2><h3>Global</h3><ul><li><a href="global.html#asciiEncoding">asciiEncoding</a></li><li><a href="global.html#base64Encoding">base64Encoding</a></li><li><a href="global.html#csvStringToJson">csvStringToJson</a></li><li><a href="global.html#csvStringToJsonStringified">csvStringToJsonStringified</a></li><li><a href="global.html#csvToJsonAsync">csvToJsonAsync</a></li><li><a href="global.html#customEncoding">customEncoding</a></li><li><a href="global.html#fieldDelimiter">fieldDelimiter</a></li><li><a href="global.html#formatValueByType">formatValueByType</a></li><li><a href="global.html#generateJsonFileFromCsv">generateJsonFileFromCsv</a></li><li><a href="global.html#getJsonFromCsv">getJsonFromCsv</a></li><li><a href="global.html#hexEncoding">hexEncoding</a></li><li><a href="global.html#indexHeader">indexHeader</a></li><li><a href="global.html#latin1Encoding">latin1Encoding</a></li><li><a href="global.html#mapRows">mapRows</a></li><li><a href="global.html#parseSubArray">parseSubArray</a></li><li><a href="global.html#supportQuotedField">supportQuotedField</a></li><li><a href="global.html#trimHeaderFieldWhiteSpace">trimHeaderFieldWhiteSpace</a></li><li><a href="global.html#ucs2Encoding">ucs2Encoding</a></li><li><a href="global.html#utf16leEncoding">utf16leEncoding</a></li><li><a href="global.html#utf8Encoding">utf8Encoding</a></li></ul></div><div class="category"><h2>2-Sync</h2><h3>Classes</h3><ul><li><a href="CsvToJson.html">CsvToJson</a></li></ul></div><div class="category"><h2>3-Async</h2><h3>Classes</h3><ul><li><a href="CsvToJsonAsync.html">CsvToJsonAsync</a></li></ul></div><div class="category"><h2>4-Browser</h2><h3>Classes</h3><ul><li><a href="BrowserApi.html">BrowserApi</a></li></ul></div><div class="category"><h2>Error Classes</h2><h3>Classes</h3><ul><li><a href="BrowserApiError.html">BrowserApiError</a></li><li><a href="ConfigurationError.html">ConfigurationError</a></li><li><a href="CsvFormatError.html">CsvFormatError</a></li><li><a href="CsvParsingError.html">CsvParsingError</a></li><li><a href="FileOperationError.html">FileOperationError</a></li><li><a href="InputValidationError.html">InputValidationError</a></li><li><a href="JsonValidationError.html">JsonValidationError</a></li></ul></div><div class="category"><h2>Utilities</h2><h3>Classes</h3><ul><li><a href="FileUtils.html">FileUtils</a></li><li><a href="JsonUtil.html">JsonUtil</a></li><li><a href="StringUtils.html">StringUtils</a></li></ul></div>
94
+
95
+ </nav>
96
+ </div>
97
+ <div class="core" id="main-content-wrapper">
98
+ <div class="content">
99
+ <header class="page-title">
100
+ <p>Class</p>
101
+ <h1>FileUtils</h1>
102
+ </header>
103
+
104
+
24
105
 
25
106
 
26
107
 
@@ -40,18 +121,29 @@ Provides both synchronous and asynchronous file operations</p></div>
40
121
  <div class="container-overview">
41
122
 
42
123
 
124
+ <div class='vertical-section'>
125
+ <div class="members">
126
+ <div class="member">
127
+ <div class=name>
128
+ <span class="tag">Constructor</span>
129
+ </div>
130
+
43
131
 
44
-
45
- <h2>Constructor</h2>
46
-
47
132
 
48
133
 
49
- <h4 class="name" id="FileUtils"><span class="type-signature"></span>new FileUtils<span class="signature">()</span><span class="type-signature"></span></h4>
134
+ <h4 class="name" id="FileUtils">
135
+ <a class="href-link" href="#FileUtils">#</a>
136
+
137
+ <span class="code-name">
138
+
139
+ new FileUtils<span class="signature">()</span><span class="type-signature"></span>
140
+
141
+ </span>
142
+ </h4>
50
143
 
51
144
 
52
145
 
53
-
54
-
146
+
55
147
 
56
148
 
57
149
 
@@ -90,18 +182,19 @@ Provides both synchronous and asynchronous file operations</p></div>
90
182
 
91
183
 
92
184
 
93
-
94
-
95
- <dt class="tag-source">Source:</dt>
96
- <dd class="tag-source"><ul class="dummy"><li>
97
- <a href="src_util_fileUtils.js.html">src/util/fileUtils.js</a>, <a href="src_util_fileUtils.js.html#line10">line 10</a>
98
- </li></ul></dd>
99
185
 
100
186
 
101
187
 
102
188
 
103
189
 
104
190
 
191
+
192
+ <p class="tag-source">
193
+ <a href="src_util_fileUtils.js.html" class="button">View Source</a>
194
+ <span>
195
+ <a href="src_util_fileUtils.js.html">src/util/fileUtils.js</a>, <a href="src_util_fileUtils.js.html#line11">line 11</a>
196
+ </span>
197
+ </p>
105
198
 
106
199
  </dl>
107
200
 
@@ -124,9 +217,15 @@ Provides both synchronous and asynchronous file operations</p></div>
124
217
 
125
218
 
126
219
 
220
+
221
+
222
+ </div>
223
+ </div>
224
+ </div>
225
+
127
226
 
128
227
  </div>
129
-
228
+
130
229
 
131
230
 
132
231
 
@@ -142,27 +241,34 @@ Provides both synchronous and asynchronous file operations</p></div>
142
241
 
143
242
 
144
243
 
145
- <h3 class="subsection-title">Methods</h3>
244
+ <div class='vertical-section'>
245
+ <h1>Methods</h1>
246
+ <div class="members">
247
+
248
+ <div class="member">
249
+
146
250
 
251
+
252
+ <h4 class="name" id="readFile">
253
+ <a class="href-link" href="#readFile">#</a>
147
254
 
255
+ <span class="code-name">
148
256
 
149
-
257
+ readFile<span class="signature">(fileInputName, encoding)</span><span class="type-signature"> &rarr; {string}</span>
258
+
259
+ </span>
260
+ </h4>
150
261
 
151
262
 
152
263
 
153
- <h4 class="name" id="readFile"><span class="type-signature"></span>readFile<span class="signature">(fileInputName, encoding)</span><span class="type-signature"> &rarr; {string}</span></h4>
154
264
 
155
-
265
+ <div class="description">
266
+ <p>Read a file synchronously with specified encoding</p>
267
+ </div>
156
268
 
157
269
 
158
270
 
159
271
 
160
- <div class="description">
161
- <p>Read a file synchronously with specified encoding</p>
162
- </div>
163
-
164
-
165
-
166
272
 
167
273
 
168
274
 
@@ -171,83 +277,85 @@ Provides both synchronous and asynchronous file operations</p></div>
171
277
 
172
278
  <h5>Parameters:</h5>
173
279
 
280
+ <div class="table-container">
281
+ <table class="params table">
282
+ <thead>
283
+ <tr>
284
+
285
+ <th>Name</th>
286
+
174
287
 
175
- <table class="params">
176
- <thead>
177
- <tr>
178
-
179
- <th>Name</th>
180
-
181
-
182
- <th>Type</th>
288
+ <th>Type</th>
183
289
 
184
-
290
+
185
291
 
186
-
292
+
187
293
 
188
- <th class="last">Description</th>
189
- </tr>
190
- </thead>
294
+ <th class="last">Description</th>
295
+ </tr>
296
+ </thead>
191
297
 
192
- <tbody>
193
-
298
+ <tbody>
299
+
194
300
 
195
- <tr>
196
-
197
- <td class="name"><code>fileInputName</code></td>
198
301
 
302
+ <tr class="deep-level-0">
303
+
304
+ <td class="name"><code>fileInputName</code></td>
305
+
199
306
 
200
- <td class="type">
201
-
202
-
203
- <span class="param-type">string</span>
307
+ <td class="type">
308
+
309
+
310
+ <code class="param-type">string</code>
204
311
 
205
312
 
206
-
207
- </td>
313
+
314
+ </td>
208
315
 
209
-
316
+
210
317
 
211
-
318
+
212
319
 
213
- <td class="description last"><p>Path to file to read</p></td>
214
- </tr>
320
+ <td class="description last"><p>Path to file to read</p></td>
321
+ </tr>
215
322
 
216
-
217
323
 
218
- <tr>
219
-
220
- <td class="name"><code>encoding</code></td>
221
-
324
+
222
325
 
223
- <td class="type">
224
326
 
225
-
226
- <span class="param-type">string</span>
327
+ <tr class="deep-level-0">
328
+
329
+ <td class="name"><code>encoding</code></td>
330
+
227
331
 
332
+ <td class="type">
333
+
334
+
335
+ <code class="param-type">string</code>
228
336
 
229
-
230
- </td>
231
337
 
232
-
338
+
339
+ </td>
233
340
 
234
-
341
+
235
342
 
236
- <td class="description last"><p>File encoding (e.g., 'utf8', 'latin1')</p></td>
237
- </tr>
343
+
238
344
 
239
-
240
- </tbody>
241
- </table>
345
+ <td class="description last"><p>File encoding (e.g., 'utf8', 'latin1')</p></td>
346
+ </tr>
242
347
 
243
348
 
349
+
350
+ </tbody>
351
+ </table>
352
+ </div>
244
353
 
245
354
 
246
355
 
247
356
 
248
- <dl class="details">
249
357
 
250
-
358
+ <dl class="details">
251
359
 
252
360
 
253
361
 
@@ -272,16 +380,19 @@ Provides both synchronous and asynchronous file operations</p></div>
272
380
 
273
381
 
274
382
 
275
- <dt class="tag-source">Source:</dt>
276
- <dd class="tag-source"><ul class="dummy"><li>
277
- <a href="src_util_fileUtils.js.html">src/util/fileUtils.js</a>, <a href="src_util_fileUtils.js.html#line19">line 19</a>
278
- </li></ul></dd>
279
383
 
280
384
 
281
385
 
282
386
 
283
387
 
284
388
 
389
+
390
+ <p class="tag-source">
391
+ <a href="src_util_fileUtils.js.html" class="button">View Source</a>
392
+ <span>
393
+ <a href="src_util_fileUtils.js.html">src/util/fileUtils.js</a>, <a href="src_util_fileUtils.js.html#line20">line 20</a>
394
+ </span>
395
+ </p>
285
396
 
286
397
  </dl>
287
398
 
@@ -297,81 +408,84 @@ Provides both synchronous and asynchronous file operations</p></div>
297
408
 
298
409
 
299
410
 
300
- <h5>Throws:</h5>
301
-
302
-
303
411
 
304
- <dl>
305
- <dt>
306
- <div class="param-desc">
307
- <p>If file read fails</p>
308
- </div>
309
- </dt>
310
- <dd></dd>
311
- <dt>
312
- <dl>
313
- <dt>
314
- Type
315
- </dt>
316
- <dd>
317
-
318
- <span class="param-type"><a href="FileOperationError.html">FileOperationError</a></span>
319
412
 
320
413
 
321
- </dd>
322
- </dl>
323
- </dt>
324
- <dd></dd>
325
- </dl>
414
+ <div class='columns method-parameter'>
415
+ <div class="column is-2"><label>Throws:</label></div>
416
+ <div class="column is-10">
417
+
418
+
419
+ <div class="columns">
420
+
421
+ <div class='param-desc column is-7'><p>If file read fails</p></div>
422
+ <div class='column is-5 has-text-left'>
423
+ <label>Type: </label>
424
+ <code class="param-type"><a href="FileOperationError.html">FileOperationError</a></code>
326
425
 
327
426
 
427
+ </div>
328
428
 
429
+ </div>
329
430
 
431
+
432
+ </div>
433
+ </div>
330
434
 
331
- <h5>Returns:</h5>
332
-
333
-
334
- <div class="param-desc">
335
- <p>File contents as string</p>
336
- </div>
337
435
 
338
436
 
437
+ <div class='columns method-parameter'>
438
+ <div class="column is-2"><label>Returns:</label></div>
439
+ <div class="column is-10">
440
+
441
+
339
442
 
340
- <dl>
341
- <dt>
342
- Type
343
- </dt>
344
- <dd>
443
+ <div class="columns">
444
+
445
+ <div class='param-desc column is-7'><p>File contents as string</p></div>
446
+
447
+
448
+ <div class='column is-5 has-text-left'>
449
+ <label>Type: </label>
345
450
 
346
- <span class="param-type">string</span>
347
-
451
+ <code class="param-type">string</code>
348
452
 
349
- </dd>
350
- </dl>
351
453
 
454
+ </div>
352
455
 
456
+ </div>
353
457
 
458
+
459
+ </div>
460
+ </div>
354
461
 
355
462
 
356
463
 
357
464
 
358
-
465
+ </div>
359
466
 
467
+ <div class="member">
360
468
 
361
-
362
469
 
363
470
 
364
- <h4 class="name" id="readFileAsync"><span class="type-signature"></span>readFileAsync<span class="signature">(fileInputName, encoding)</span><span class="type-signature"> &rarr; {Promise.&lt;string>}</span></h4>
471
+ <h4 class="name" id="readFileAsync">
472
+ <a class="href-link" href="#readFileAsync">#</a>
473
+
474
+ <span class="code-name">
475
+
476
+ readFileAsync<span class="signature">(fileInputName, encoding)</span><span class="type-signature"> &rarr; {Promise.&lt;string>}</span>
477
+
478
+ </span>
479
+ </h4>
365
480
 
366
481
 
367
482
 
368
-
369
-
370
-
371
- <div class="description">
372
- <p>Read a file asynchronously with specified encoding
483
+
484
+ <div class="description">
485
+ <p>Read a file asynchronously with specified encoding
373
486
  Uses fs.promises when available, falls back to callback-based API</p>
374
- </div>
487
+ </div>
488
+
375
489
 
376
490
 
377
491
 
@@ -383,95 +497,97 @@ Uses fs.promises when available, falls back to callback-based API</p>
383
497
 
384
498
  <h5>Parameters:</h5>
385
499
 
500
+ <div class="table-container">
501
+ <table class="params table">
502
+ <thead>
503
+ <tr>
504
+
505
+ <th>Name</th>
506
+
386
507
 
387
- <table class="params">
388
- <thead>
389
- <tr>
390
-
391
- <th>Name</th>
392
-
393
-
394
- <th>Type</th>
508
+ <th>Type</th>
395
509
 
396
-
510
+
397
511
 
398
-
399
- <th>Default</th>
400
-
512
+
513
+ <th>Default</th>
514
+
401
515
 
402
- <th class="last">Description</th>
403
- </tr>
404
- </thead>
516
+ <th class="last">Description</th>
517
+ </tr>
518
+ </thead>
405
519
 
406
- <tbody>
407
-
520
+ <tbody>
521
+
408
522
 
409
- <tr>
410
-
411
- <td class="name"><code>fileInputName</code></td>
412
523
 
524
+ <tr class="deep-level-0">
525
+
526
+ <td class="name"><code>fileInputName</code></td>
527
+
413
528
 
414
- <td class="type">
415
-
416
-
417
- <span class="param-type">string</span>
529
+ <td class="type">
530
+
531
+
532
+ <code class="param-type">string</code>
418
533
 
419
534
 
420
-
421
- </td>
535
+
536
+ </td>
422
537
 
423
-
538
+
424
539
 
425
-
426
- <td class="default">
427
-
428
- </td>
429
-
540
+
541
+ <td class="default">
542
+
543
+ </td>
544
+
430
545
 
431
- <td class="description last"><p>Path to file to read</p></td>
432
- </tr>
546
+ <td class="description last"><p>Path to file to read</p></td>
547
+ </tr>
433
548
 
434
-
435
549
 
436
- <tr>
437
-
438
- <td class="name"><code>encoding</code></td>
439
-
550
+
440
551
 
441
- <td class="type">
442
552
 
443
-
444
- <span class="param-type">string</span>
553
+ <tr class="deep-level-0">
554
+
555
+ <td class="name"><code>encoding</code></td>
556
+
445
557
 
558
+ <td class="type">
559
+
560
+
561
+ <code class="param-type">string</code>
446
562
 
447
-
448
- </td>
449
563
 
450
-
564
+
565
+ </td>
451
566
 
452
-
453
- <td class="default">
454
-
455
- utf8
456
-
457
- </td>
458
-
567
+
459
568
 
460
- <td class="description last"><p>File encoding (default: 'utf8')</p></td>
461
- </tr>
569
+
570
+ <td class="default">
571
+
572
+ utf8
573
+
574
+ </td>
575
+
462
576
 
463
-
464
- </tbody>
465
- </table>
577
+ <td class="description last"><p>File encoding (default: 'utf8')</p></td>
578
+ </tr>
466
579
 
467
580
 
581
+
582
+ </tbody>
583
+ </table>
584
+ </div>
468
585
 
469
586
 
470
587
 
471
588
 
472
- <dl class="details">
473
589
 
474
-
590
+ <dl class="details">
475
591
 
476
592
 
477
593
 
@@ -496,16 +612,19 @@ Uses fs.promises when available, falls back to callback-based API</p>
496
612
 
497
613
 
498
614
 
499
- <dt class="tag-source">Source:</dt>
500
- <dd class="tag-source"><ul class="dummy"><li>
501
- <a href="src_util_fileUtils.js.html">src/util/fileUtils.js</a>, <a href="src_util_fileUtils.js.html#line35">line 35</a>
502
- </li></ul></dd>
503
615
 
504
616
 
505
617
 
506
618
 
507
619
 
508
620
 
621
+
622
+ <p class="tag-source">
623
+ <a href="src_util_fileUtils.js.html" class="button">View Source</a>
624
+ <span>
625
+ <a href="src_util_fileUtils.js.html">src/util/fileUtils.js</a>, <a href="src_util_fileUtils.js.html#line36">line 36</a>
626
+ </span>
627
+ </p>
509
628
 
510
629
  </dl>
511
630
 
@@ -521,81 +640,84 @@ Uses fs.promises when available, falls back to callback-based API</p>
521
640
 
522
641
 
523
642
 
524
- <h5>Throws:</h5>
525
-
526
-
527
643
 
528
- <dl>
529
- <dt>
530
- <div class="param-desc">
531
- <p>If file read fails</p>
532
- </div>
533
- </dt>
534
- <dd></dd>
535
- <dt>
536
- <dl>
537
- <dt>
538
- Type
539
- </dt>
540
- <dd>
541
-
542
- <span class="param-type"><a href="FileOperationError.html">FileOperationError</a></span>
543
644
 
544
645
 
545
- </dd>
546
- </dl>
547
- </dt>
548
- <dd></dd>
549
- </dl>
646
+ <div class='columns method-parameter'>
647
+ <div class="column is-2"><label>Throws:</label></div>
648
+ <div class="column is-10">
649
+
650
+
651
+ <div class="columns">
652
+
653
+ <div class='param-desc column is-7'><p>If file read fails</p></div>
654
+ <div class='column is-5 has-text-left'>
655
+ <label>Type: </label>
656
+ <code class="param-type"><a href="FileOperationError.html">FileOperationError</a></code>
550
657
 
551
658
 
659
+ </div>
552
660
 
661
+ </div>
553
662
 
663
+
664
+ </div>
665
+ </div>
554
666
 
555
- <h5>Returns:</h5>
556
-
557
-
558
- <div class="param-desc">
559
- <p>Promise resolving to file contents</p>
560
- </div>
561
667
 
562
668
 
669
+ <div class='columns method-parameter'>
670
+ <div class="column is-2"><label>Returns:</label></div>
671
+ <div class="column is-10">
672
+
673
+
563
674
 
564
- <dl>
565
- <dt>
566
- Type
567
- </dt>
568
- <dd>
675
+ <div class="columns">
676
+
677
+ <div class='param-desc column is-7'><p>Promise resolving to file contents</p></div>
678
+
679
+
680
+ <div class='column is-5 has-text-left'>
681
+ <label>Type: </label>
569
682
 
570
- <span class="param-type">Promise.&lt;string></span>
571
-
683
+ <code class="param-type">Promise.&lt;string></code>
572
684
 
573
- </dd>
574
- </dl>
575
685
 
686
+ </div>
576
687
 
688
+ </div>
577
689
 
690
+
691
+ </div>
692
+ </div>
578
693
 
579
694
 
580
695
 
581
696
 
582
-
697
+ </div>
583
698
 
699
+ <div class="member">
584
700
 
585
-
586
701
 
587
702
 
588
- <h4 class="name" id="writeFile"><span class="type-signature"></span>writeFile<span class="signature">(json, fileOutputName)</span><span class="type-signature"></span></h4>
703
+ <h4 class="name" id="writeFile">
704
+ <a class="href-link" href="#writeFile">#</a>
705
+
706
+ <span class="code-name">
707
+
708
+ writeFile<span class="signature">(json, fileOutputName)</span><span class="type-signature"></span>
709
+
710
+ </span>
711
+ </h4>
589
712
 
590
713
 
591
714
 
592
-
593
-
594
-
595
- <div class="description">
596
- <p>Write content to a file synchronously
715
+
716
+ <div class="description">
717
+ <p>Write content to a file synchronously
597
718
  Logs confirmation message to console on success</p>
598
- </div>
719
+ </div>
720
+
599
721
 
600
722
 
601
723
 
@@ -607,83 +729,85 @@ Logs confirmation message to console on success</p>
607
729
 
608
730
  <h5>Parameters:</h5>
609
731
 
732
+ <div class="table-container">
733
+ <table class="params table">
734
+ <thead>
735
+ <tr>
736
+
737
+ <th>Name</th>
738
+
610
739
 
611
- <table class="params">
612
- <thead>
613
- <tr>
614
-
615
- <th>Name</th>
616
-
617
-
618
- <th>Type</th>
740
+ <th>Type</th>
619
741
 
620
-
742
+
621
743
 
622
-
744
+
623
745
 
624
- <th class="last">Description</th>
625
- </tr>
626
- </thead>
746
+ <th class="last">Description</th>
747
+ </tr>
748
+ </thead>
627
749
 
628
- <tbody>
629
-
750
+ <tbody>
751
+
630
752
 
631
- <tr>
632
-
633
- <td class="name"><code>json</code></td>
634
753
 
754
+ <tr class="deep-level-0">
755
+
756
+ <td class="name"><code>json</code></td>
757
+
635
758
 
636
- <td class="type">
637
-
638
-
639
- <span class="param-type">string</span>
759
+ <td class="type">
760
+
761
+
762
+ <code class="param-type">string</code>
640
763
 
641
764
 
642
-
643
- </td>
765
+
766
+ </td>
644
767
 
645
-
768
+
646
769
 
647
-
770
+
648
771
 
649
- <td class="description last"><p>Content to write to file</p></td>
650
- </tr>
772
+ <td class="description last"><p>Content to write to file</p></td>
773
+ </tr>
651
774
 
652
-
653
775
 
654
- <tr>
655
-
656
- <td class="name"><code>fileOutputName</code></td>
657
-
776
+
658
777
 
659
- <td class="type">
660
778
 
661
-
662
- <span class="param-type">string</span>
779
+ <tr class="deep-level-0">
780
+
781
+ <td class="name"><code>fileOutputName</code></td>
782
+
663
783
 
784
+ <td class="type">
785
+
786
+
787
+ <code class="param-type">string</code>
664
788
 
665
-
666
- </td>
667
789
 
668
-
790
+
791
+ </td>
669
792
 
670
-
793
+
671
794
 
672
- <td class="description last"><p>Path to output file</p></td>
673
- </tr>
795
+
674
796
 
675
-
676
- </tbody>
677
- </table>
797
+ <td class="description last"><p>Path to output file</p></td>
798
+ </tr>
678
799
 
679
800
 
801
+
802
+ </tbody>
803
+ </table>
804
+ </div>
680
805
 
681
806
 
682
807
 
683
808
 
684
- <dl class="details">
685
809
 
686
-
810
+ <dl class="details">
687
811
 
688
812
 
689
813
 
@@ -708,16 +832,19 @@ Logs confirmation message to console on success</p>
708
832
 
709
833
 
710
834
 
711
- <dt class="tag-source">Source:</dt>
712
- <dd class="tag-source"><ul class="dummy"><li>
713
- <a href="src_util_fileUtils.js.html">src/util/fileUtils.js</a>, <a href="src_util_fileUtils.js.html#line62">line 62</a>
714
- </li></ul></dd>
715
835
 
716
836
 
717
837
 
718
838
 
719
839
 
720
840
 
841
+
842
+ <p class="tag-source">
843
+ <a href="src_util_fileUtils.js.html" class="button">View Source</a>
844
+ <span>
845
+ <a href="src_util_fileUtils.js.html">src/util/fileUtils.js</a>, <a href="src_util_fileUtils.js.html#line63">line 63</a>
846
+ </span>
847
+ </p>
721
848
 
722
849
  </dl>
723
850
 
@@ -733,59 +860,59 @@ Logs confirmation message to console on success</p>
733
860
 
734
861
 
735
862
 
736
- <h5>Throws:</h5>
737
863
 
738
-
739
-
740
- <dl>
741
- <dt>
742
- <div class="param-desc">
743
- <p>If file write fails</p>
744
- </div>
745
- </dt>
746
- <dd></dd>
747
- <dt>
748
- <dl>
749
- <dt>
750
- Type
751
- </dt>
752
- <dd>
753
-
754
- <span class="param-type"><a href="FileOperationError.html">FileOperationError</a></span>
755
864
 
756
865
 
757
- </dd>
758
- </dl>
759
- </dt>
760
- <dd></dd>
761
- </dl>
866
+ <div class='columns method-parameter'>
867
+ <div class="column is-2"><label>Throws:</label></div>
868
+ <div class="column is-10">
869
+
870
+
871
+ <div class="columns">
872
+
873
+ <div class='param-desc column is-7'><p>If file write fails</p></div>
874
+ <div class='column is-5 has-text-left'>
875
+ <label>Type: </label>
876
+ <code class="param-type"><a href="FileOperationError.html">FileOperationError</a></code>
762
877
 
763
878
 
879
+ </div>
764
880
 
881
+ </div>
765
882
 
883
+
884
+ </div>
885
+ </div>
766
886
 
767
887
 
768
888
 
769
889
 
770
890
 
771
891
 
772
-
892
+ </div>
773
893
 
894
+ <div class="member">
774
895
 
775
-
776
896
 
777
897
 
778
- <h4 class="name" id="writeFileAsync"><span class="type-signature"></span>writeFileAsync<span class="signature">(json, fileOutputName)</span><span class="type-signature"> &rarr; {Promise.&lt;void>}</span></h4>
898
+ <h4 class="name" id="writeFileAsync">
899
+ <a class="href-link" href="#writeFileAsync">#</a>
900
+
901
+ <span class="code-name">
902
+
903
+ writeFileAsync<span class="signature">(json, fileOutputName)</span><span class="type-signature"> &rarr; {Promise.&lt;void>}</span>
904
+
905
+ </span>
906
+ </h4>
779
907
 
780
908
 
781
909
 
782
-
783
-
784
-
785
- <div class="description">
786
- <p>Write content to a file asynchronously
910
+
911
+ <div class="description">
912
+ <p>Write content to a file asynchronously
787
913
  Uses fs.promises when available, falls back to callback-based API</p>
788
- </div>
914
+ </div>
915
+
789
916
 
790
917
 
791
918
 
@@ -797,83 +924,85 @@ Uses fs.promises when available, falls back to callback-based API</p>
797
924
 
798
925
  <h5>Parameters:</h5>
799
926
 
927
+ <div class="table-container">
928
+ <table class="params table">
929
+ <thead>
930
+ <tr>
931
+
932
+ <th>Name</th>
933
+
800
934
 
801
- <table class="params">
802
- <thead>
803
- <tr>
804
-
805
- <th>Name</th>
806
-
807
-
808
- <th>Type</th>
935
+ <th>Type</th>
809
936
 
810
-
937
+
811
938
 
812
-
939
+
813
940
 
814
- <th class="last">Description</th>
815
- </tr>
816
- </thead>
941
+ <th class="last">Description</th>
942
+ </tr>
943
+ </thead>
817
944
 
818
- <tbody>
819
-
945
+ <tbody>
946
+
820
947
 
821
- <tr>
822
-
823
- <td class="name"><code>json</code></td>
824
948
 
949
+ <tr class="deep-level-0">
950
+
951
+ <td class="name"><code>json</code></td>
952
+
825
953
 
826
- <td class="type">
827
-
828
-
829
- <span class="param-type">string</span>
954
+ <td class="type">
955
+
956
+
957
+ <code class="param-type">string</code>
830
958
 
831
959
 
832
-
833
- </td>
960
+
961
+ </td>
834
962
 
835
-
963
+
836
964
 
837
-
965
+
838
966
 
839
- <td class="description last"><p>Content to write to file</p></td>
840
- </tr>
967
+ <td class="description last"><p>Content to write to file</p></td>
968
+ </tr>
841
969
 
842
-
843
970
 
844
- <tr>
845
-
846
- <td class="name"><code>fileOutputName</code></td>
847
-
971
+
848
972
 
849
- <td class="type">
850
973
 
851
-
852
- <span class="param-type">string</span>
974
+ <tr class="deep-level-0">
975
+
976
+ <td class="name"><code>fileOutputName</code></td>
977
+
853
978
 
979
+ <td class="type">
980
+
981
+
982
+ <code class="param-type">string</code>
854
983
 
855
-
856
- </td>
857
984
 
858
-
985
+
986
+ </td>
859
987
 
860
-
988
+
861
989
 
862
- <td class="description last"><p>Path to output file</p></td>
863
- </tr>
990
+
864
991
 
865
-
866
- </tbody>
867
- </table>
992
+ <td class="description last"><p>Path to output file</p></td>
993
+ </tr>
868
994
 
869
995
 
996
+
997
+ </tbody>
998
+ </table>
999
+ </div>
870
1000
 
871
1001
 
872
1002
 
873
1003
 
874
- <dl class="details">
875
1004
 
876
-
1005
+ <dl class="details">
877
1006
 
878
1007
 
879
1008
 
@@ -898,16 +1027,19 @@ Uses fs.promises when available, falls back to callback-based API</p>
898
1027
 
899
1028
 
900
1029
 
901
- <dt class="tag-source">Source:</dt>
902
- <dd class="tag-source"><ul class="dummy"><li>
903
- <a href="src_util_fileUtils.js.html">src/util/fileUtils.js</a>, <a href="src_util_fileUtils.js.html#line80">line 80</a>
904
- </li></ul></dd>
905
1030
 
906
1031
 
907
1032
 
908
1033
 
909
1034
 
910
1035
 
1036
+
1037
+ <p class="tag-source">
1038
+ <a href="src_util_fileUtils.js.html" class="button">View Source</a>
1039
+ <span>
1040
+ <a href="src_util_fileUtils.js.html">src/util/fileUtils.js</a>, <a href="src_util_fileUtils.js.html#line81">line 81</a>
1041
+ </span>
1042
+ </p>
911
1043
 
912
1044
  </dl>
913
1045
 
@@ -923,65 +1055,64 @@ Uses fs.promises when available, falls back to callback-based API</p>
923
1055
 
924
1056
 
925
1057
 
926
- <h5>Throws:</h5>
927
1058
 
928
-
929
1059
 
930
- <dl>
931
- <dt>
932
- <div class="param-desc">
933
- <p>If file write fails</p>
934
- </div>
935
- </dt>
936
- <dd></dd>
937
- <dt>
938
- <dl>
939
- <dt>
940
- Type
941
- </dt>
942
- <dd>
943
-
944
- <span class="param-type"><a href="FileOperationError.html">FileOperationError</a></span>
945
1060
 
946
-
947
- </dd>
948
- </dl>
949
- </dt>
950
- <dd></dd>
951
- </dl>
1061
+ <div class='columns method-parameter'>
1062
+ <div class="column is-2"><label>Throws:</label></div>
1063
+ <div class="column is-10">
1064
+
1065
+
1066
+ <div class="columns">
1067
+
1068
+ <div class='param-desc column is-7'><p>If file write fails</p></div>
1069
+ <div class='column is-5 has-text-left'>
1070
+ <label>Type: </label>
1071
+ <code class="param-type"><a href="FileOperationError.html">FileOperationError</a></code>
952
1072
 
953
1073
 
1074
+ </div>
954
1075
 
1076
+ </div>
955
1077
 
1078
+
1079
+ </div>
1080
+ </div>
956
1081
 
957
- <h5>Returns:</h5>
958
-
959
-
960
- <div class="param-desc">
961
- <p>Promise that resolves when write completes</p>
962
- </div>
963
1082
 
964
1083
 
1084
+ <div class='columns method-parameter'>
1085
+ <div class="column is-2"><label>Returns:</label></div>
1086
+ <div class="column is-10">
1087
+
1088
+
965
1089
 
966
- <dl>
967
- <dt>
968
- Type
969
- </dt>
970
- <dd>
1090
+ <div class="columns">
1091
+
1092
+ <div class='param-desc column is-7'><p>Promise that resolves when write completes</p></div>
1093
+
1094
+
1095
+ <div class='column is-5 has-text-left'>
1096
+ <label>Type: </label>
971
1097
 
972
- <span class="param-type">Promise.&lt;void></span>
1098
+ <code class="param-type">Promise.&lt;void></code>
973
1099
 
974
1100
 
975
- </dd>
976
- </dl>
977
-
1101
+ </div>
978
1102
 
1103
+ </div>
979
1104
 
1105
+
1106
+ </div>
1107
+ </div>
980
1108
 
981
1109
 
982
1110
 
983
1111
 
984
-
1112
+ </div>
1113
+
1114
+ </div>
1115
+ </div>
985
1116
 
986
1117
 
987
1118
 
@@ -994,19 +1125,26 @@ Uses fs.promises when available, falls back to callback-based API</p>
994
1125
 
995
1126
 
996
1127
 
997
- </div>
998
-
999
- <nav>
1000
- <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="BrowserApi.html">BrowserApi</a></li><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="CsvToJson.html">CsvToJson</a></li><li><a href="CsvToJsonAsync.html">CsvToJsonAsync</a></li><li><a href="FileOperationError.html">FileOperationError</a></li><li><a href="FileUtils.html">FileUtils</a></li><li><a href="InputValidationError.html">InputValidationError</a></li><li><a href="JsonUtil.html">JsonUtil</a></li><li><a href="JsonValidationError.html">JsonValidationError</a></li></ul><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#browser">browser</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>
1001
- </nav>
1002
-
1003
- <br class="clear">
1128
+ </div>
1129
+
1130
+ <footer class="footer">
1131
+ <div class="content has-text-centered">
1132
+ <p>Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.5</a></p>
1133
+ <p class="sidebar-created-by">
1134
+ <a href="https://github.com/SoftwareBrothers/better-docs" target="_blank">BetterDocs theme</a> provided with <i class="fas fa-heart"></i> by
1135
+ <a href="http://softwarebrothers.co" target="_blank">SoftwareBrothers - JavaScript Development Agency</a>
1136
+ </p>
1137
+ </div>
1138
+ </footer>
1139
+
1140
+ </div>
1141
+ <div id="side-nav" class="side-nav">
1142
+ </div>
1143
+ </div>
1144
+ <script src="scripts/app.min.js"></script>
1145
+ <script>PR.prettyPrint();</script>
1146
+ <script src="scripts/linenumber.js"> </script>
1004
1147
 
1005
- <footer>
1006
- 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)
1007
- </footer>
1008
1148
 
1009
- <script> prettyPrint(); </script>
1010
- <script src="scripts/linenumber.js"> </script>
1011
1149
  </body>
1012
1150
  </html>