convert-csv-to-json 4.12.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 +13 -11
  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: FileOperationError</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> FileOperationError</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: FileOperationError</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>FileOperationError</h1>
102
+ </header>
103
+
104
+
24
105
 
25
106
 
26
107
 
@@ -40,25 +121,36 @@ Thrown when file read or write operations fail</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="FileOperationError">
135
+ <a class="href-link" href="#FileOperationError">#</a>
136
+
137
+ <span class="code-name">
138
+
139
+ new FileOperationError<span class="signature">(operation, filePath, originalError)</span><span class="type-signature"></span>
140
+
141
+ </span>
142
+ </h4>
46
143
 
47
144
 
48
145
 
49
- <h4 class="name" id="FileOperationError"><span class="type-signature"></span>new FileOperationError<span class="signature">(operation, filePath, originalError)</span><span class="type-signature"></span></h4>
50
146
 
51
-
147
+ <div class="description">
148
+ <p>Create a file operation error</p>
149
+ </div>
52
150
 
53
151
 
54
152
 
55
153
 
56
- <div class="description">
57
- <p>Create a file operation error</p>
58
- </div>
59
-
60
-
61
-
62
154
 
63
155
 
64
156
 
@@ -67,106 +159,110 @@ Thrown when file read or write operations fail</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>operation</code></td>
94
183
 
184
+ <tr class="deep-level-0">
185
+
186
+ <td class="name"><code>operation</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>Type of operation that failed (e.g., 'read', 'write')</p></td>
110
- </tr>
202
+ <td class="description last"><p>Type of operation that failed (e.g., 'read', 'write')</p></td>
203
+ </tr>
111
204
 
112
-
113
205
 
114
- <tr>
115
-
116
- <td class="name"><code>filePath</code></td>
117
-
206
+
118
207
 
119
- <td class="type">
120
208
 
121
-
122
- <span class="param-type">string</span>
209
+ <tr class="deep-level-0">
210
+
211
+ <td class="name"><code>filePath</code></td>
212
+
123
213
 
214
+ <td class="type">
215
+
216
+
217
+ <code class="param-type">string</code>
124
218
 
125
-
126
- </td>
127
219
 
128
-
220
+
221
+ </td>
129
222
 
130
-
223
+
131
224
 
132
- <td class="description last"><p>Path to the file where operation failed</p></td>
133
- </tr>
225
+
134
226
 
135
-
227
+ <td class="description last"><p>Path to the file where operation failed</p></td>
228
+ </tr>
136
229
 
137
- <tr>
138
-
139
- <td class="name"><code>originalError</code></td>
140
-
141
230
 
142
- <td class="type">
231
+
232
+
143
233
 
144
-
145
- <span class="param-type">Error</span>
234
+ <tr class="deep-level-0">
235
+
236
+ <td class="name"><code>originalError</code></td>
237
+
146
238
 
239
+ <td class="type">
240
+
241
+
242
+ <code class="param-type">Error</code>
147
243
 
148
-
149
- </td>
150
244
 
151
-
245
+
246
+ </td>
152
247
 
153
-
248
+
154
249
 
155
- <td class="description last"><p>The underlying error object from Node.js</p></td>
156
- </tr>
250
+
157
251
 
158
-
159
- </tbody>
160
- </table>
252
+ <td class="description last"><p>The underlying error object from Node.js</p></td>
253
+ </tr>
161
254
 
162
255
 
256
+
257
+ </tbody>
258
+ </table>
259
+ </div>
163
260
 
164
261
 
165
262
 
166
263
 
167
- <dl class="details">
168
264
 
169
-
265
+ <dl class="details">
170
266
 
171
267
 
172
268
 
@@ -191,16 +287,19 @@ Thrown when file read or write operations fail</p></div>
191
287
 
192
288
 
193
289
 
194
- <dt class="tag-source">Source:</dt>
195
- <dd class="tag-source"><ul class="dummy"><li>
196
- <a href="src_util_errors.js.html">src/util/errors.js</a>, <a href="src_util_errors.js.html#line204">line 204</a>
197
- </li></ul></dd>
198
290
 
199
291
 
200
292
 
201
293
 
202
294
 
203
295
 
296
+
297
+ <p class="tag-source">
298
+ <a href="src_util_errors.js.html" class="button">View Source</a>
299
+ <span>
300
+ <a href="src_util_errors.js.html">src/util/errors.js</a>, <a href="src_util_errors.js.html#line210">line 210</a>
301
+ </span>
302
+ </p>
204
303
 
205
304
  </dl>
206
305
 
@@ -223,9 +322,15 @@ Thrown when file read or write operations fail</p></div>
223
322
 
224
323
 
225
324
 
325
+
326
+
327
+ </div>
328
+ </div>
329
+ </div>
330
+
226
331
 
227
332
  </div>
228
-
333
+
229
334
 
230
335
 
231
336
 
@@ -252,19 +357,26 @@ Thrown when file read or write operations fail</p></div>
252
357
 
253
358
 
254
359
 
255
- </div>
256
-
257
- <nav>
258
- <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>
259
- </nav>
260
-
261
- <br class="clear">
360
+ </div>
361
+
362
+ <footer class="footer">
363
+ <div class="content has-text-centered">
364
+ <p>Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.5</a></p>
365
+ <p class="sidebar-created-by">
366
+ <a href="https://github.com/SoftwareBrothers/better-docs" target="_blank">BetterDocs theme</a> provided with <i class="fas fa-heart"></i> by
367
+ <a href="http://softwarebrothers.co" target="_blank">SoftwareBrothers - JavaScript Development Agency</a>
368
+ </p>
369
+ </div>
370
+ </footer>
371
+
372
+ </div>
373
+ <div id="side-nav" class="side-nav">
374
+ </div>
375
+ </div>
376
+ <script src="scripts/app.min.js"></script>
377
+ <script>PR.prettyPrint();</script>
378
+ <script src="scripts/linenumber.js"> </script>
262
379
 
263
- <footer>
264
- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.5</a> on Fri Mar 20 2026 16:02:42 GMT+0000 (Coordinated Universal Time)
265
- </footer>
266
380
 
267
- <script> prettyPrint(); </script>
268
- <script src="scripts/linenumber.js"> </script>
269
381
  </body>
270
382
  </html>