Add CSVtoArray
This commit is contained in:
3
test/CSVToArray/CSVToArray.js
Normal file
3
test/CSVToArray/CSVToArray.js
Normal file
@ -0,0 +1,3 @@
|
||||
const CSVToArray = (data, delimiter = ',', omitFirstRow = false) =>
|
||||
data.slice(omitFirstRow ? data.indexOf('\n')+1 : 0).split('\n').map(v => v.split(delimiter));
|
||||
module.exports = CSVToArray;
|
||||
Reference in New Issue
Block a user