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: JsonValidationError</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> JsonValidationError</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: JsonValidationError</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>JsonValidationError</h1>
102
+ </header>
103
+
104
+
24
105
 
25
106
 
26
107
 
@@ -40,25 +121,36 @@ Thrown when parsed CSV data cannot be converted to valid JSON</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
+
131
+
43
132
 
44
133
 
45
- <h2>Constructor</h2>
134
+ <h4 class="name" id="JsonValidationError">
135
+ <a class="href-link" href="#JsonValidationError">#</a>
136
+
137
+ <span class="code-name">
138
+
139
+ new JsonValidationError<span class="signature">(csvData, originalError)</span><span class="type-signature"></span>
140
+
141
+ </span>
142
+ </h4>
46
143
 
47
144
 
48
145
 
49
- <h4 class="name" id="JsonValidationError"><span class="type-signature"></span>new JsonValidationError<span class="signature">(csvData, originalError)</span><span class="type-signature"></span></h4>
50
146
 
51
-
147
+ <div class="description">
148
+ <p>Create a JSON validation error</p>
149
+ </div>
52
150
 
53
151
 
54
152
 
55
153
 
56
- <div class="description">
57
- <p>Create a JSON validation error</p>
58
- </div>
59
-
60
-
61
-
62
154
 
63
155
 
64
156
 
@@ -67,83 +159,85 @@ Thrown when parsed CSV data cannot be converted to valid JSON</p></div>
67
159
 
68
160
  <h5>Parameters:</h5>
69
161
 
162
+ <div class="table-container">
163
+ <table class="params table">
164
+ <thead>
165
+ <tr>
166
+
167
+ <th>Name</th>
168
+
70
169
 
71
- <table class="params">
72
- <thead>
73
- <tr>
74
-
75
- <th>Name</th>
76
-
77
-
78
- <th>Type</th>
170
+ <th>Type</th>
79
171
 
80
-
172
+
81
173
 
82
-
174
+
83
175
 
84
- <th class="last">Description</th>
85
- </tr>
86
- </thead>
176
+ <th class="last">Description</th>
177
+ </tr>
178
+ </thead>
87
179
 
88
- <tbody>
89
-
180
+ <tbody>
181
+
90
182
 
91
- <tr>
92
-
93
- <td class="name"><code>csvData</code></td>
94
183
 
184
+ <tr class="deep-level-0">
185
+
186
+ <td class="name"><code>csvData</code></td>
187
+
95
188
 
96
- <td class="type">
97
-
98
-
99
- <span class="param-type">string</span>
189
+ <td class="type">
190
+
191
+
192
+ <code class="param-type">string</code>
100
193
 
101
194
 
102
-
103
- </td>
195
+
196
+ </td>
104
197
 
105
-
198
+
106
199
 
107
-
200
+
108
201
 
109
- <td class="description last"><p>The CSV data that failed validation</p></td>
110
- </tr>
202
+ <td class="description last"><p>The CSV data that failed validation</p></td>
203
+ </tr>
111
204
 
112
-
113
205
 
114
- <tr>
115
-
116
- <td class="name"><code>originalError</code></td>
117
-
206
+
118
207
 
119
- <td class="type">
120
208
 
121
-
122
- <span class="param-type">Error</span>
209
+ <tr class="deep-level-0">
210
+
211
+ <td class="name"><code>originalError</code></td>
212
+
123
213
 
214
+ <td class="type">
215
+
216
+
217
+ <code class="param-type">Error</code>
124
218
 
125
-
126
- </td>
127
219
 
128
-
220
+
221
+ </td>
129
222
 
130
-
223
+
131
224
 
132
- <td class="description last"><p>The underlying JSON parsing error</p></td>
133
- </tr>
225
+
134
226
 
135
-
136
- </tbody>
137
- </table>
227
+ <td class="description last"><p>The underlying JSON parsing error</p></td>
228
+ </tr>
138
229
 
139
230
 
231
+
232
+ </tbody>
233
+ </table>
234
+ </div>
140
235
 
141
236
 
142
237
 
143
238
 
144
- <dl class="details">
145
239
 
146
-
240
+ <dl class="details">
147
241
 
148
242
 
149
243
 
@@ -168,16 +262,19 @@ Thrown when parsed CSV data cannot be converted to valid JSON</p></div>
168
262
 
169
263
 
170
264
 
171
- <dt class="tag-source">Source:</dt>
172
- <dd class="tag-source"><ul class="dummy"><li>
173
- <a href="src_util_errors.js.html">src/util/errors.js</a>, <a href="src_util_errors.js.html#line236">line 236</a>
174
- </li></ul></dd>
175
265
 
176
266
 
177
267
 
178
268
 
179
269
 
180
270
 
271
+
272
+ <p class="tag-source">
273
+ <a href="src_util_errors.js.html" class="button">View Source</a>
274
+ <span>
275
+ <a href="src_util_errors.js.html">src/util/errors.js</a>, <a href="src_util_errors.js.html#line243">line 243</a>
276
+ </span>
277
+ </p>
181
278
 
182
279
  </dl>
183
280
 
@@ -200,9 +297,15 @@ Thrown when parsed CSV data cannot be converted to valid JSON</p></div>
200
297
 
201
298
 
202
299
 
300
+
301
+
302
+ </div>
303
+ </div>
304
+ </div>
305
+
203
306
 
204
307
  </div>
205
-
308
+
206
309
 
207
310
 
208
311
 
@@ -229,19 +332,26 @@ Thrown when parsed CSV data cannot be converted to valid JSON</p></div>
229
332
 
230
333
 
231
334
 
232
- </div>
233
-
234
- <nav>
235
- <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>
236
- </nav>
237
-
238
- <br class="clear">
335
+ </div>
336
+
337
+ <footer class="footer">
338
+ <div class="content has-text-centered">
339
+ <p>Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.5</a></p>
340
+ <p class="sidebar-created-by">
341
+ <a href="https://github.com/SoftwareBrothers/better-docs" target="_blank">BetterDocs theme</a> provided with <i class="fas fa-heart"></i> by
342
+ <a href="http://softwarebrothers.co" target="_blank">SoftwareBrothers - JavaScript Development Agency</a>
343
+ </p>
344
+ </div>
345
+ </footer>
346
+
347
+ </div>
348
+ <div id="side-nav" class="side-nav">
349
+ </div>
350
+ </div>
351
+ <script src="scripts/app.min.js"></script>
352
+ <script>PR.prettyPrint();</script>
353
+ <script src="scripts/linenumber.js"> </script>
239
354
 
240
- <footer>
241
- 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)
242
- </footer>
243
355
 
244
- <script> prettyPrint(); </script>
245
- <script src="scripts/linenumber.js"> </script>
246
356
  </body>
247
357
  </html>