Format snippets
This commit is contained in:
@ -19,7 +19,10 @@ const CSVToJSON = (data, delimiter = ',') => {
|
||||
.split('\n')
|
||||
.map(v => {
|
||||
const values = v.split(delimiter);
|
||||
return titles.reduce((obj, title, index) => ((obj[title] = values[index]), obj), {});
|
||||
return titles.reduce(
|
||||
(obj, title, index) => ((obj[title] = values[index]), obj),
|
||||
{}
|
||||
);
|
||||
});
|
||||
};
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user