Skip to content
Open
Changes from 1 commit
Commits
Show all changes
159 commits
Select commit Hold shift + click to select a range
8244ffc
feature
Apr 26, 2023
fec13dc
fixing function name
Apr 26, 2023
34a330d
fixing headers when supported quoted field
Apr 26, 2023
2775862
class CsvToJson
J-Siu Jul 18, 2023
7b0640e
Bump chai from 4.3.7 to 4.3.8
dependabot[bot] Aug 24, 2023
5e58ac7
Bump actions/checkout from 3 to 4
dependabot[bot] Sep 4, 2023
569f352
Bump chai from 4.3.8 to 4.3.9
dependabot[bot] Sep 27, 2023
b40b1a1
Bump chai from 4.3.9 to 4.3.10
dependabot[bot] Sep 28, 2023
067e06f
Bump actions/setup-node from 3 to 4
dependabot[bot] Oct 23, 2023
9c2c107
add node 20.x CI
iuccio Nov 19, 2023
b2dad16
Update README.md
iuccio Nov 28, 2023
f24badf
Bump github/codeql-action from 2 to 3
dependabot[bot] Dec 18, 2023
382b354
Bump mocha from 10.2.0 to 10.3.0
dependabot[bot] Feb 8, 2024
3b66b6a
WIP migrate to jest
iuccio Feb 17, 2024
66e4fc0
migrate do jest
iuccio Feb 17, 2024
8703340
add jest config
iuccio Feb 17, 2024
79f576b
remove nodeJs 12.x support, add v 21.x
iuccio Feb 17, 2024
43b7f59
update security info and docu
iuccio Feb 17, 2024
18abbb1
add scritp for manual versioning
iuccio Feb 17, 2024
dcf23c9
2.1.0
iuccio Feb 17, 2024
3c3759b
2.2.0
iuccio Feb 17, 2024
853a318
update security docu
iuccio Feb 17, 2024
b27f326
add CD releasing [PATCH]
iuccio Feb 24, 2024
503e9d1
add git config global for cd
iuccio Feb 24, 2024
7a8c6c8
add acces key to push on master
iuccio Feb 25, 2024
226c4b5
exec jobs sequentially, return script status
iuccio Feb 25, 2024
cd648b3
2.3.0
iuccio Feb 25, 2024
8efba93
2.4.0
github-actions[bot] Feb 25, 2024
9cfeef0
2.5.0
github-actions[bot] Feb 25, 2024
6ac8bf4
2.6.0
github-actions[bot] Feb 25, 2024
7134331
disable temporary releasing
iuccio Feb 25, 2024
03f09d7
2.7.0
iuccio Feb 25, 2024
ef31def
2.8.0
iuccio Feb 25, 2024
a93b7bb
2.9.0
iuccio Feb 25, 2024
f4189b1
2.10.0
iuccio Feb 25, 2024
fd4691a
2.11.0
iuccio Feb 25, 2024
3760d16
new release v2.12.0 [skip ci]
iuccio Feb 25, 2024
887a155
2.13.0
iuccio Feb 25, 2024
633672e
2.14.0
iuccio Feb 25, 2024
8311985
2.15.0
iuccio Feb 25, 2024
1855a95
new release v2.16.0 [skip ci]
iuccio Feb 25, 2024
32ed2c9
2.17.0
iuccio Feb 25, 2024
b94f637
2.8.0
iuccio Feb 25, 2024
1266655
2.9.0
iuccio Feb 25, 2024
e7a4d5b
new release v2.10.0 [skip ci]
iuccio Feb 25, 2024
463fbc9
new release v2.8.0 [skip ci]
iuccio Feb 25, 2024
33a47da
new release v2.9.0 [skip ci]
iuccio Feb 25, 2024
a139161
new release v2.8.0 [skip ci]
iuccio Feb 25, 2024
662367d
update ci/cd
iuccio Feb 25, 2024
7a93640
enable npm and git publication
iuccio Feb 25, 2024
911f733
new release v2.8.0 [skip ci]
github-actions[bot] Feb 25, 2024
1311fed
push git tag
iuccio Feb 25, 2024
f84b4ae
new release v2.9.0 [skip ci]
github-actions[bot] Feb 25, 2024
90b820c
updade node ci/cd badge status
iuccio Feb 25, 2024
05db22c
new release v2.10.0 [skip ci]
github-actions[bot] Feb 25, 2024
c82e72f
try to fix tag pushing [PATCH]
iuccio Feb 25, 2024
47b5640
new release v2.10.1 [skip ci]
github-actions[bot] Feb 25, 2024
52aa38b
new release v2.11.0 [skip ci]
iuccio Feb 25, 2024
b6c2022
new release v2.12.0 [skip ci]
iuccio Feb 25, 2024
8407511
fix tagging [PATCH]
iuccio Feb 25, 2024
2a6668c
new release v2.12.1 [skip ci]
iuccio Feb 25, 2024
20b382d
new release v2.10.2 [skip ci]
iuccio Feb 25, 2024
52ab2ea
new release v2.14.0 [skip ci]
iuccio Feb 25, 2024
c0c27b8
new release v2.15.0 [skip ci]
iuccio Feb 25, 2024
2dffb53
new release v2.16.0 [skip ci]
iuccio Feb 25, 2024
0c811f5
tray to fix tag publishing [PATCH]
iuccio Feb 25, 2024
f7a4b49
new release v2.16.1 [skip ci]
github-actions[bot] Feb 25, 2024
3fce343
add tag to commit id [PATCH]
iuccio Feb 25, 2024
556669a
code clean up
iuccio Feb 25, 2024
a39a249
2.17.0
iuccio Feb 25, 2024
918cb4e
new release v2.18.0 [skip ci]
iuccio Feb 25, 2024
3a5705c
new release v2.19.0 [skip ci]
iuccio Feb 25, 2024
1697c4f
fix ci/cd
iuccio Feb 25, 2024
175da56
new release v2.20.0 [skip ci]
github-actions[bot] Feb 25, 2024
d394e77
new release v2.21.0 [skip ci]
iuccio Feb 25, 2024
50f88c2
[skip ci]
iuccio Feb 25, 2024
8aa7777
fix versioning
iuccio Feb 25, 2024
8ade580
fix versioning
github-actions[bot] Feb 25, 2024
0b2cedb
fix versioning
github-actions[bot] Feb 25, 2024
cc0973b
fix versioning
github-actions[bot] Feb 25, 2024
f838c7e
fix versioning
github-actions[bot] Feb 25, 2024
6a244d0
disable cd
iuccio Feb 25, 2024
3931513
disable cd
iuccio Feb 25, 2024
a620885
disable cd
iuccio Feb 25, 2024
cecf426
new release [skip-ci]
iuccio Feb 25, 2024
bf57a7b
fix ci/cd action
iuccio Feb 25, 2024
8244fe7
new release [skip ci]
github-actions[bot] Feb 25, 2024
2fa0ac8
update documentation
iuccio Feb 25, 2024
2f78866
new release [skip ci]
github-actions[bot] Feb 25, 2024
da915c1
use iuccio/[email protected] to publish npm
iuccio Mar 9, 2024
2b90da2
new release [skip ci]
github-actions[bot] Mar 9, 2024
c6d4b98
update docu and ci
iuccio Mar 9, 2024
4298bb0
new release [skip ci]
github-actions[bot] Mar 9, 2024
ee07748
update ci/cd
iuccio Mar 15, 2024
5108651
new release [skip ci]
github-actions[bot] Mar 15, 2024
034d9cc
update badge
iuccio Mar 15, 2024
65d2a22
new release [skip ci]
github-actions[bot] Mar 15, 2024
b1125a7
Bump iuccio/npm-semver-publish-action from 1.0.0 to 1.10.0
dependabot[bot] Mar 18, 2024
ab5c5f7
apply publish on master branch
iuccio Mar 22, 2024
e31ae5a
new release [skip ci]
github-actions[bot] Mar 22, 2024
6d34f73
exec release only on master
iuccio Mar 22, 2024
2855d82
new release [skip ci]
iuccio Mar 22, 2024
a176c0e
new release [skip ci]
iuccio Mar 22, 2024
82af3be
update docu
iuccio Mar 22, 2024
39f60cc
new release [skip ci]
github-actions[bot] Mar 22, 2024
ec14602
Merge branch 'master' into master
iuccio Mar 29, 2024
68c25cf
Merge pull request #38 from airon-assustadus/master
iuccio Mar 29, 2024
44c75a6
new release [skip ci]
github-actions[bot] Mar 29, 2024
5056ab5
update docu
iuccio Mar 29, 2024
610bd4a
new release [skip ci]
github-actions[bot] Mar 29, 2024
ae22ee5
upgrade semver action publishing
iuccio Mar 30, 2024
553ea28
try to fix permision
iuccio Mar 30, 2024
5c12141
2.40.0
iuccio Mar 30, 2024
41900a3
fix publishing
iuccio Mar 30, 2024
0f14570
update semver action
iuccio Mar 30, 2024
a130811
2.41.0
iuccio Mar 30, 2024
9afc560
fix ci/cd
iuccio Mar 30, 2024
f6c65ea
fix ci/cd
iuccio Mar 30, 2024
cac43da
2.42.0
iuccio Mar 30, 2024
644a16e
new release [skip ci]
github-actions[bot] Mar 30, 2024
b41d2b9
Create FUNDING.yml
iuccio Mar 31, 2024
48b93c9
new release [skip ci]
github-actions[bot] Mar 31, 2024
fec3e80
Create CODE_OF_CONDUCT.md
iuccio Apr 21, 2024
9454ddb
new release [skip ci]
github-actions[bot] Apr 21, 2024
7c77a26
Create CONTRIBUTING.md
iuccio Apr 21, 2024
6214f3a
new release [skip ci]
github-actions[bot] Apr 21, 2024
c6d9e77
fux license mismatch, close #61
iuccio May 12, 2024
b718c45
new release [skip ci]
github-actions[bot] May 12, 2024
2610c98
Bump braces from 3.0.2 to 3.0.3 in the npm_and_yarn group
dependabot[bot] Jun 18, 2024
819ad04
Merge pull request #63 from iuccio/dependabot/npm_and_yarn/npm_and_ya…
iuccio Jun 18, 2024
64a1668
new release [skip ci]
github-actions[bot] Jun 18, 2024
41bb231
Bump micromatch from 4.0.5 to 4.0.8 in the npm_and_yarn group
dependabot[bot] Sep 8, 2024
7bd43f9
new release [skip ci]
github-actions[bot] Sep 8, 2024
d0d732b
Bump cross-spawn from 7.0.3 to 7.0.6 in the npm_and_yarn group
dependabot[bot] Dec 3, 2024
748c846
new release [skip ci]
github-actions[bot] Dec 3, 2024
a538be5
change license to MIT. Closes #62. [major]
iuccio May 2, 2025
d2e8adc
new release [skip ci]
github-actions[bot] May 2, 2025
98b5dd3
Update issue templates
iuccio May 3, 2025
a973f8d
new release [skip ci]
github-actions[bot] May 3, 2025
83ebeb0
toggle on/off to remove whitespaces from header fields: closes #67
iuccio May 4, 2025
80143de
new release [skip ci]
github-actions[bot] May 4, 2025
44dbff9
enable support for nodejs 22
iuccio May 4, 2025
2e0d5ca
new release [skip ci]
github-actions[bot] May 4, 2025
ecf85f6
Update README.md
iuccio May 4, 2025
b44e7fc
new release [skip ci]
github-actions[bot] May 4, 2025
237fc08
README broken link, close #72
iuccio Jun 14, 2025
611835c
new release [skip ci]
github-actions[bot] Jun 14, 2025
857c916
Bump actions/checkout from 4 to 5
dependabot[bot] Aug 12, 2025
bffa13e
new release [skip ci]
github-actions[bot] Sep 5, 2025
91c657e
Update index.d.ts
matt-laird Sep 10, 2025
8b106d8
new release [skip ci]
github-actions[bot] Sep 19, 2025
553b705
Bump actions/setup-node from 4 to 5
dependabot[bot] Sep 8, 2025
18f30a5
new release [skip ci]
github-actions[bot] Sep 19, 2025
e66e1a0
Change license from GPL v3.0 to MIT in Readme.md
Uzlopak Sep 30, 2025
b327cf2
new release [skip ci]
github-actions[bot] Oct 1, 2025
6a2dd88
chore: add node 24 and remove node 21 to/from ci -cd workflow
Uzlopak Sep 30, 2025
c802687
Apply suggestion from @Uzlopak
Uzlopak Oct 1, 2025
a13ef28
new release [skip ci]
github-actions[bot] Oct 1, 2025
8f2a48b
Merge branch 'FixIssue39'
J-Siu Oct 3, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions src/csvToJson.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ const defaultFieldDelimiter = ";";

class CsvToJson {

#index = 0

formatValueByType(active) {
this.printValueFormatByType = active;
return this;
Expand All @@ -24,11 +26,11 @@ class CsvToJson {
return this;
}

indexHeader(indexHeader) {
if(isNaN(indexHeader)){
indexHeader(index) {
if(isNaN(index)){
throw new Error('The index Header must be a Number!');
}
this.indexHeader = indexHeader;
this.#index = index;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is the actual fix.

return this;
}

Expand Down Expand Up @@ -100,10 +102,7 @@ class CsvToJson {
}

getIndexHeader(){
if(this.indexHeader !== null && !isNaN(this.indexHeader)){
return this.indexHeader;
}
return 0;
return this.#index;
}

buildJsonResult(headers, currentLine) {
Expand Down