convert-csv-to-json 3.17.0 → 3.19.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.
@@ -14,7 +14,7 @@ jobs:
14
14
  experimental: [true]
15
15
 
16
16
  steps:
17
- - uses: actions/checkout@v5
17
+ - uses: actions/checkout@v6
18
18
  - name: Use Node.js ${{ matrix.node-version }}
19
19
  uses: actions/setup-node@v6
20
20
  with:
@@ -35,7 +35,7 @@ jobs:
35
35
  name: release
36
36
  runs-on: ubuntu-latest
37
37
  steps:
38
- - uses: actions/checkout@v5
38
+ - uses: actions/checkout@v6
39
39
  with:
40
40
  token: ${{ secrets.ACTION_TOKEN }}
41
41
  - uses: fregante/setup-git-user@v2
@@ -35,7 +35,7 @@ jobs:
35
35
 
36
36
  steps:
37
37
  - name: Checkout repository
38
- uses: actions/checkout@v5
38
+ uses: actions/checkout@v6
39
39
 
40
40
  # Initializes the CodeQL tools for scanning.
41
41
  - name: Initialize CodeQL
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "convert-csv-to-json",
3
- "version": "3.17.0",
3
+ "version": "3.19.0",
4
4
  "description": "Convert CSV to JSON",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
package/src/csvToJson.js CHANGED
@@ -29,11 +29,11 @@ class CsvToJson {
29
29
  return this;
30
30
  }
31
31
 
32
- indexHeader(indexHeader) {
33
- if(isNaN(indexHeader)){
32
+ indexHeader(indexHeaderValue) {
33
+ if(isNaN(indexHeaderValue)){
34
34
  throw new Error('The index Header must be a Number!');
35
35
  }
36
- this.indexHeader = indexHeader;
36
+ this.indexHeaderValue = indexHeaderValue;
37
37
  return this;
38
38
  }
39
39
 
@@ -118,8 +118,8 @@ class CsvToJson {
118
118
  }
119
119
 
120
120
  getIndexHeader(){
121
- if(this.indexHeader !== null && !isNaN(this.indexHeader)){
122
- return this.indexHeader;
121
+ if(this.indexHeaderValue !== null && !isNaN(this.indexHeaderValue)){
122
+ return this.indexHeaderValue;
123
123
  }
124
124
  return 0;
125
125
  }