convert-csv-to-json 4.2.0 → 4.3.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 (60) hide show
  1. package/.eslintignore +3 -0
  2. package/.eslintrc.json +48 -0
  3. package/.github/workflows/ci-cd.yml +28 -2
  4. package/docs/api/BrowserApi.html +2435 -0
  5. package/docs/api/BrowserApiError.html +522 -0
  6. package/docs/api/ConfigurationError.html +594 -0
  7. package/docs/api/CsvFormatError.html +530 -0
  8. package/docs/api/CsvParsingError.html +384 -0
  9. package/docs/api/CsvToJson.html +3136 -0
  10. package/docs/api/CsvToJsonAsync.html +2672 -0
  11. package/docs/api/FileOperationError.html +270 -0
  12. package/docs/api/FileUtils.html +1012 -0
  13. package/docs/api/InputValidationError.html +293 -0
  14. package/docs/api/JsonUtil.html +340 -0
  15. package/docs/api/JsonValidationError.html +247 -0
  16. package/docs/api/fonts/OpenSans-Bold-webfont.eot +0 -0
  17. package/docs/api/fonts/OpenSans-Bold-webfont.svg +1830 -0
  18. package/docs/api/fonts/OpenSans-Bold-webfont.woff +0 -0
  19. package/docs/api/fonts/OpenSans-BoldItalic-webfont.eot +0 -0
  20. package/docs/api/fonts/OpenSans-BoldItalic-webfont.svg +1830 -0
  21. package/docs/api/fonts/OpenSans-BoldItalic-webfont.woff +0 -0
  22. package/docs/api/fonts/OpenSans-Italic-webfont.eot +0 -0
  23. package/docs/api/fonts/OpenSans-Italic-webfont.svg +1830 -0
  24. package/docs/api/fonts/OpenSans-Italic-webfont.woff +0 -0
  25. package/docs/api/fonts/OpenSans-Light-webfont.eot +0 -0
  26. package/docs/api/fonts/OpenSans-Light-webfont.svg +1831 -0
  27. package/docs/api/fonts/OpenSans-Light-webfont.woff +0 -0
  28. package/docs/api/fonts/OpenSans-LightItalic-webfont.eot +0 -0
  29. package/docs/api/fonts/OpenSans-LightItalic-webfont.svg +1835 -0
  30. package/docs/api/fonts/OpenSans-LightItalic-webfont.woff +0 -0
  31. package/docs/api/fonts/OpenSans-Regular-webfont.eot +0 -0
  32. package/docs/api/fonts/OpenSans-Regular-webfont.svg +1831 -0
  33. package/docs/api/fonts/OpenSans-Regular-webfont.woff +0 -0
  34. package/docs/api/global.html +3315 -0
  35. package/docs/api/index.html +326 -0
  36. package/docs/api/index.js.html +341 -0
  37. package/docs/api/scripts/linenumber.js +25 -0
  38. package/docs/api/scripts/prettify/Apache-License-2.0.txt +202 -0
  39. package/docs/api/scripts/prettify/lang-css.js +2 -0
  40. package/docs/api/scripts/prettify/prettify.js +28 -0
  41. package/docs/api/src_browserApi.js.html +271 -0
  42. package/docs/api/src_csvToJson.js.html +605 -0
  43. package/docs/api/src_csvToJsonAsync.js.html +244 -0
  44. package/docs/api/src_util_errors.js.html +374 -0
  45. package/docs/api/src_util_fileUtils.js.html +147 -0
  46. package/docs/api/src_util_jsonUtils.js.html +75 -0
  47. package/docs/api/src_util_stringUtils.js.html +212 -0
  48. package/docs/api/styles/jsdoc-default.css +358 -0
  49. package/docs/api/styles/prettify-jsdoc.css +111 -0
  50. package/docs/api/styles/prettify-tomorrow.css +132 -0
  51. package/index.js +109 -32
  52. package/jsdoc.json +17 -0
  53. package/package.json +10 -3
  54. package/src/browserApi.js +96 -4
  55. package/src/csvToJson.js +163 -2
  56. package/src/csvToJsonAsync.js +74 -14
  57. package/src/util/errors.js +96 -0
  58. package/src/util/fileUtils.js +34 -0
  59. package/src/util/jsonUtils.js +8 -0
  60. package/src/util/stringUtils.js +51 -0
@@ -0,0 +1,293 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <title>JSDoc: Class: InputValidationError</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">
14
+ </head>
15
+
16
+ <body>
17
+
18
+ <div id="main">
19
+
20
+ <h1 class="page-title">Class: InputValidationError</h1>
21
+
22
+
23
+
24
+
25
+
26
+
27
+ <section>
28
+
29
+ <header>
30
+
31
+ <h2><span class="attribs"><span class="type-signature"></span></span>InputValidationError<span class="signature">(paramName, expectedType, receivedType, details)</span><span class="type-signature"></span></h2>
32
+
33
+ <div class="class-description"><p>Input validation errors
34
+ Thrown when function parameters don't meet expected type or value requirements</p></div>
35
+
36
+
37
+ </header>
38
+
39
+ <article>
40
+ <div class="container-overview">
41
+
42
+
43
+
44
+
45
+ <h2>Constructor</h2>
46
+
47
+
48
+
49
+ <h4 class="name" id="InputValidationError"><span class="type-signature"></span>new InputValidationError<span class="signature">(paramName, expectedType, receivedType, details)</span><span class="type-signature"></span></h4>
50
+
51
+
52
+
53
+
54
+
55
+
56
+ <div class="description">
57
+ <p>Create an input validation error</p>
58
+ </div>
59
+
60
+
61
+
62
+
63
+
64
+
65
+
66
+
67
+
68
+ <h5>Parameters:</h5>
69
+
70
+
71
+ <table class="params">
72
+ <thead>
73
+ <tr>
74
+
75
+ <th>Name</th>
76
+
77
+
78
+ <th>Type</th>
79
+
80
+
81
+
82
+
83
+
84
+ <th class="last">Description</th>
85
+ </tr>
86
+ </thead>
87
+
88
+ <tbody>
89
+
90
+
91
+ <tr>
92
+
93
+ <td class="name"><code>paramName</code></td>
94
+
95
+
96
+ <td class="type">
97
+
98
+
99
+ <span class="param-type">string</span>
100
+
101
+
102
+
103
+ </td>
104
+
105
+
106
+
107
+
108
+
109
+ <td class="description last"><p>Name of the invalid parameter</p></td>
110
+ </tr>
111
+
112
+
113
+
114
+ <tr>
115
+
116
+ <td class="name"><code>expectedType</code></td>
117
+
118
+
119
+ <td class="type">
120
+
121
+
122
+ <span class="param-type">string</span>
123
+
124
+
125
+
126
+ </td>
127
+
128
+
129
+
130
+
131
+
132
+ <td class="description last"><p>Expected type description</p></td>
133
+ </tr>
134
+
135
+
136
+
137
+ <tr>
138
+
139
+ <td class="name"><code>receivedType</code></td>
140
+
141
+
142
+ <td class="type">
143
+
144
+
145
+ <span class="param-type">string</span>
146
+
147
+
148
+
149
+ </td>
150
+
151
+
152
+
153
+
154
+
155
+ <td class="description last"><p>Actual type received</p></td>
156
+ </tr>
157
+
158
+
159
+
160
+ <tr>
161
+
162
+ <td class="name"><code>details</code></td>
163
+
164
+
165
+ <td class="type">
166
+
167
+
168
+ <span class="param-type">string</span>
169
+
170
+
171
+
172
+ </td>
173
+
174
+
175
+
176
+
177
+
178
+ <td class="description last"><p>Additional error details (optional)</p></td>
179
+ </tr>
180
+
181
+
182
+ </tbody>
183
+ </table>
184
+
185
+
186
+
187
+
188
+
189
+
190
+ <dl class="details">
191
+
192
+
193
+
194
+
195
+
196
+
197
+
198
+
199
+
200
+
201
+
202
+
203
+
204
+
205
+
206
+
207
+
208
+
209
+
210
+
211
+
212
+
213
+
214
+
215
+
216
+
217
+ <dt class="tag-source">Source:</dt>
218
+ <dd class="tag-source"><ul class="dummy"><li>
219
+ <a href="src_util_errors.js.html">src/util/errors.js</a>, <a href="src_util_errors.js.html#line63">line 63</a>
220
+ </li></ul></dd>
221
+
222
+
223
+
224
+
225
+
226
+
227
+
228
+ </dl>
229
+
230
+
231
+
232
+
233
+
234
+
235
+
236
+
237
+
238
+
239
+
240
+
241
+
242
+
243
+
244
+
245
+
246
+
247
+
248
+
249
+
250
+ </div>
251
+
252
+
253
+
254
+
255
+
256
+
257
+
258
+
259
+
260
+
261
+
262
+
263
+
264
+
265
+
266
+
267
+
268
+
269
+
270
+
271
+ </article>
272
+
273
+ </section>
274
+
275
+
276
+
277
+
278
+ </div>
279
+
280
+ <nav>
281
+ <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>
282
+ </nav>
283
+
284
+ <br class="clear">
285
+
286
+ <footer>
287
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.5</a> on Fri Mar 20 2026 14:48:29 GMT+0000 (Coordinated Universal Time)
288
+ </footer>
289
+
290
+ <script> prettyPrint(); </script>
291
+ <script src="scripts/linenumber.js"> </script>
292
+ </body>
293
+ </html>
@@ -0,0 +1,340 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <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">
14
+ </head>
15
+
16
+ <body>
17
+
18
+ <div id="main">
19
+
20
+ <h1 class="page-title">Class: JsonUtil</h1>
21
+
22
+
23
+
24
+
25
+
26
+
27
+ <section>
28
+
29
+ <header>
30
+
31
+ <h2><span class="attribs"><span class="type-signature"></span></span>JsonUtil<span class="signature">()</span><span class="type-signature"></span></h2>
32
+
33
+ <div class="class-description"><p>JSON validation utilities</p></div>
34
+
35
+
36
+ </header>
37
+
38
+ <article>
39
+ <div class="container-overview">
40
+
41
+
42
+
43
+
44
+ <h2>Constructor</h2>
45
+
46
+
47
+
48
+ <h4 class="name" id="JsonUtil"><span class="type-signature"></span>new JsonUtil<span class="signature">()</span><span class="type-signature"></span></h4>
49
+
50
+
51
+
52
+
53
+
54
+
55
+
56
+
57
+
58
+
59
+
60
+
61
+
62
+
63
+
64
+
65
+
66
+
67
+ <dl class="details">
68
+
69
+
70
+
71
+
72
+
73
+
74
+
75
+
76
+
77
+
78
+
79
+
80
+
81
+
82
+
83
+
84
+
85
+
86
+
87
+
88
+
89
+
90
+
91
+
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
+
99
+
100
+
101
+
102
+
103
+
104
+
105
+ </dl>
106
+
107
+
108
+
109
+
110
+
111
+
112
+
113
+
114
+
115
+
116
+
117
+
118
+
119
+
120
+
121
+
122
+
123
+
124
+
125
+
126
+
127
+ </div>
128
+
129
+
130
+
131
+
132
+
133
+
134
+
135
+
136
+
137
+
138
+
139
+
140
+
141
+
142
+
143
+
144
+ <h3 class="subsection-title">Methods</h3>
145
+
146
+
147
+
148
+
149
+
150
+
151
+
152
+ <h4 class="name" id="validateJson"><span class="type-signature"></span>validateJson<span class="signature">(json)</span><span class="type-signature"></span></h4>
153
+
154
+
155
+
156
+
157
+
158
+
159
+ <div class="description">
160
+ <p>Validate that a string is valid JSON</p>
161
+ </div>
162
+
163
+
164
+
165
+
166
+
167
+
168
+
169
+
170
+
171
+ <h5>Parameters:</h5>
172
+
173
+
174
+ <table class="params">
175
+ <thead>
176
+ <tr>
177
+
178
+ <th>Name</th>
179
+
180
+
181
+ <th>Type</th>
182
+
183
+
184
+
185
+
186
+
187
+ <th class="last">Description</th>
188
+ </tr>
189
+ </thead>
190
+
191
+ <tbody>
192
+
193
+
194
+ <tr>
195
+
196
+ <td class="name"><code>json</code></td>
197
+
198
+
199
+ <td class="type">
200
+
201
+
202
+ <span class="param-type">string</span>
203
+
204
+
205
+
206
+ </td>
207
+
208
+
209
+
210
+
211
+
212
+ <td class="description last"><p>JSON string to validate</p></td>
213
+ </tr>
214
+
215
+
216
+ </tbody>
217
+ </table>
218
+
219
+
220
+
221
+
222
+
223
+
224
+ <dl class="details">
225
+
226
+
227
+
228
+
229
+
230
+
231
+
232
+
233
+
234
+
235
+
236
+
237
+
238
+
239
+
240
+
241
+
242
+
243
+
244
+
245
+
246
+
247
+
248
+
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
+
256
+
257
+
258
+
259
+
260
+
261
+
262
+ </dl>
263
+
264
+
265
+
266
+
267
+
268
+
269
+
270
+
271
+
272
+
273
+
274
+
275
+
276
+ <h5>Throws:</h5>
277
+
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
+
296
+
297
+ </dd>
298
+ </dl>
299
+ </dt>
300
+ <dd></dd>
301
+ </dl>
302
+
303
+
304
+
305
+
306
+
307
+
308
+
309
+
310
+
311
+
312
+
313
+
314
+
315
+
316
+
317
+
318
+ </article>
319
+
320
+ </section>
321
+
322
+
323
+
324
+
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">
332
+
333
+ <footer>
334
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.5</a> on Fri Mar 20 2026 14:48:29 GMT+0000 (Coordinated Universal Time)
335
+ </footer>
336
+
337
+ <script> prettyPrint(); </script>
338
+ <script src="scripts/linenumber.js"> </script>
339
+ </body>
340
+ </html>