convert-csv-to-json 3.18.0 → 3.20.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 (2) hide show
  1. package/package.json +1 -1
  2. package/src/csvToJson.js +5 -5
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "convert-csv-to-json",
3
- "version": "3.18.0",
3
+ "version": "3.20.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
  }