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@
|
|
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@
|
|
38
|
+
- uses: actions/checkout@v6
|
|
39
39
|
with:
|
|
40
40
|
token: ${{ secrets.ACTION_TOKEN }}
|
|
41
41
|
- uses: fregante/setup-git-user@v2
|
package/package.json
CHANGED
package/src/csvToJson.js
CHANGED
|
@@ -29,11 +29,11 @@ class CsvToJson {
|
|
|
29
29
|
return this;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
indexHeader(
|
|
33
|
-
if(isNaN(
|
|
32
|
+
indexHeader(indexHeaderValue) {
|
|
33
|
+
if(isNaN(indexHeaderValue)){
|
|
34
34
|
throw new Error('The index Header must be a Number!');
|
|
35
35
|
}
|
|
36
|
-
this.
|
|
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.
|
|
122
|
-
return this.
|
|
121
|
+
if(this.indexHeaderValue !== null && !isNaN(this.indexHeaderValue)){
|
|
122
|
+
return this.indexHeaderValue;
|
|
123
123
|
}
|
|
124
124
|
return 0;
|
|
125
125
|
}
|