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: JsonUtil</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> JsonUtil</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: JsonUtil</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>JsonUtil</h1>
102
+ </header>
103
+
104
+
24
105
 
25
106
 
26
107
 
@@ -39,18 +120,29 @@
39
120
  <div class="container-overview">
40
121
 
41
122
 
123
+ <div class='vertical-section'>
124
+ <div class="members">
125
+ <div class="member">
126
+ <div class=name>
127
+ <span class="tag">Constructor</span>
128
+ </div>
129
+
42
130
 
43
-
44
- <h2>Constructor</h2>
45
-
46
131
 
47
132
 
48
- <h4 class="name" id="JsonUtil"><span class="type-signature"></span>new JsonUtil<span class="signature">()</span><span class="type-signature"></span></h4>
133
+ <h4 class="name" id="JsonUtil">
134
+ <a class="href-link" href="#JsonUtil">#</a>
135
+
136
+ <span class="code-name">
137
+
138
+ new JsonUtil<span class="signature">()</span><span class="type-signature"></span>
139
+
140
+ </span>
141
+ </h4>
49
142
 
50
143
 
51
144
 
52
-
53
-
145
+
54
146
 
55
147
 
56
148
 
@@ -89,18 +181,19 @@
89
181
 
90
182
 
91
183
 
92
-
93
-
94
- <dt class="tag-source">Source:</dt>
95
- <dd class="tag-source"><ul class="dummy"><li>
96
- <a href="src_util_jsonUtils.js.html">src/util/jsonUtils.js</a>, <a href="src_util_jsonUtils.js.html#line8">line 8</a>
97
- </li></ul></dd>
98
184
 
99
185
 
100
186
 
101
187
 
102
188
 
103
189
 
190
+
191
+ <p class="tag-source">
192
+ <a href="src_util_jsonUtils.js.html" class="button">View Source</a>
193
+ <span>
194
+ <a href="src_util_jsonUtils.js.html">src/util/jsonUtils.js</a>, <a href="src_util_jsonUtils.js.html#line9">line 9</a>
195
+ </span>
196
+ </p>
104
197
 
105
198
  </dl>
106
199
 
@@ -123,9 +216,15 @@
123
216
 
124
217
 
125
218
 
219
+
220
+
221
+ </div>
222
+ </div>
223
+ </div>
224
+
126
225
 
127
226
  </div>
128
-
227
+
129
228
 
130
229
 
131
230
 
@@ -141,27 +240,34 @@
141
240
 
142
241
 
143
242
 
144
- <h3 class="subsection-title">Methods</h3>
243
+ <div class='vertical-section'>
244
+ <h1>Methods</h1>
245
+ <div class="members">
246
+
247
+ <div class="member">
248
+
145
249
 
250
+
251
+ <h4 class="name" id="validateJson">
252
+ <a class="href-link" href="#validateJson">#</a>
146
253
 
254
+ <span class="code-name">
147
255
 
148
-
256
+ validateJson<span class="signature">(json)</span><span class="type-signature"></span>
257
+
258
+ </span>
259
+ </h4>
149
260
 
150
261
 
151
262
 
152
- <h4 class="name" id="validateJson"><span class="type-signature"></span>validateJson<span class="signature">(json)</span><span class="type-signature"></span></h4>
153
263
 
154
-
264
+ <div class="description">
265
+ <p>Validate that a string is valid JSON</p>
266
+ </div>
155
267
 
156
268
 
157
269
 
158
270
 
159
- <div class="description">
160
- <p>Validate that a string is valid JSON</p>
161
- </div>
162
-
163
-
164
-
165
271
 
166
272
 
167
273
 
@@ -170,52 +276,54 @@
170
276
 
171
277
  <h5>Parameters:</h5>
172
278
 
279
+ <div class="table-container">
280
+ <table class="params table">
281
+ <thead>
282
+ <tr>
283
+
284
+ <th>Name</th>
285
+
173
286
 
174
- <table class="params">
175
- <thead>
176
- <tr>
177
-
178
- <th>Name</th>
179
-
180
-
181
- <th>Type</th>
287
+ <th>Type</th>
182
288
 
183
-
289
+
184
290
 
185
-
291
+
186
292
 
187
- <th class="last">Description</th>
188
- </tr>
189
- </thead>
293
+ <th class="last">Description</th>
294
+ </tr>
295
+ </thead>
190
296
 
191
- <tbody>
192
-
297
+ <tbody>
298
+
193
299
 
194
- <tr>
195
-
196
- <td class="name"><code>json</code></td>
197
300
 
301
+ <tr class="deep-level-0">
302
+
303
+ <td class="name"><code>json</code></td>
304
+
198
305
 
199
- <td class="type">
200
-
201
-
202
- <span class="param-type">string</span>
306
+ <td class="type">
307
+
308
+
309
+ <code class="param-type">string</code>
203
310
 
204
311
 
205
-
206
- </td>
312
+
313
+ </td>
207
314
 
208
-
315
+
209
316
 
210
-
317
+
211
318
 
212
- <td class="description last"><p>JSON string to validate</p></td>
213
- </tr>
319
+ <td class="description last"><p>JSON string to validate</p></td>
320
+ </tr>
214
321
 
215
-
216
- </tbody>
217
- </table>
218
322
 
323
+
324
+ </tbody>
325
+ </table>
326
+ </div>
219
327
 
220
328
 
221
329
 
@@ -246,18 +354,19 @@
246
354
 
247
355
 
248
356
 
249
-
250
-
251
- <dt class="tag-source">Source:</dt>
252
- <dd class="tag-source"><ul class="dummy"><li>
253
- <a href="src_util_jsonUtils.js.html">src/util/jsonUtils.js</a>, <a href="src_util_jsonUtils.js.html#line15">line 15</a>
254
- </li></ul></dd>
255
357
 
256
358
 
257
359
 
258
360
 
259
361
 
260
362
 
363
+
364
+ <p class="tag-source">
365
+ <a href="src_util_jsonUtils.js.html" class="button">View Source</a>
366
+ <span>
367
+ <a href="src_util_jsonUtils.js.html">src/util/jsonUtils.js</a>, <a href="src_util_jsonUtils.js.html#line16">line 16</a>
368
+ </span>
369
+ </p>
261
370
 
262
371
  </dl>
263
372
 
@@ -273,43 +382,39 @@
273
382
 
274
383
 
275
384
 
276
- <h5>Throws:</h5>
277
385
 
278
-
279
-
280
- <dl>
281
- <dt>
282
- <div class="param-desc">
283
- <p>If JSON is invalid</p>
284
- </div>
285
- </dt>
286
- <dd></dd>
287
- <dt>
288
- <dl>
289
- <dt>
290
- Type
291
- </dt>
292
- <dd>
293
-
294
- <span class="param-type"><a href="JsonValidationError.html">JsonValidationError</a></span>
295
386
 
296
387
 
297
- </dd>
298
- </dl>
299
- </dt>
300
- <dd></dd>
301
- </dl>
388
+ <div class='columns method-parameter'>
389
+ <div class="column is-2"><label>Throws:</label></div>
390
+ <div class="column is-10">
391
+
392
+
393
+ <div class="columns">
394
+
395
+ <div class='param-desc column is-7'><p>If JSON is invalid</p></div>
396
+ <div class='column is-5 has-text-left'>
397
+ <label>Type: </label>
398
+ <code class="param-type"><a href="JsonValidationError.html">JsonValidationError</a></code>
302
399
 
303
400
 
401
+ </div>
304
402
 
403
+ </div>
305
404
 
405
+
406
+ </div>
407
+ </div>
306
408
 
307
409
 
308
410
 
309
411
 
310
412
 
311
413
 
312
-
414
+ </div>
415
+
416
+ </div>
417
+ </div>
313
418
 
314
419
 
315
420
 
@@ -322,19 +427,26 @@
322
427
 
323
428
 
324
429
 
325
- </div>
326
-
327
- <nav>
328
- <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>
329
- </nav>
330
-
331
- <br class="clear">
430
+ </div>
431
+
432
+ <footer class="footer">
433
+ <div class="content has-text-centered">
434
+ <p>Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.5</a></p>
435
+ <p class="sidebar-created-by">
436
+ <a href="https://github.com/SoftwareBrothers/better-docs" target="_blank">BetterDocs theme</a> provided with <i class="fas fa-heart"></i> by
437
+ <a href="http://softwarebrothers.co" target="_blank">SoftwareBrothers - JavaScript Development Agency</a>
438
+ </p>
439
+ </div>
440
+ </footer>
441
+
442
+ </div>
443
+ <div id="side-nav" class="side-nav">
444
+ </div>
445
+ </div>
446
+ <script src="scripts/app.min.js"></script>
447
+ <script>PR.prettyPrint();</script>
448
+ <script src="scripts/linenumber.js"> </script>
332
449
 
333
- <footer>
334
- 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)
335
- </footer>
336
450
 
337
- <script> prettyPrint(); </script>
338
- <script src="scripts/linenumber.js"> </script>
339
451
  </body>
340
452
  </html>