This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//var csv is the CSV contents with headers | |
function csvJSON(csv){ | |
var lines=csv.split('\n'); | |
var result = []; | |
var headers=lines[0].split(','); | |
lines.splice(0, 1); | |
lines.forEach(function(line) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
To run this: | |
sudo npm i -g [email protected] | |
Navigate to folder where this is saved: | |
nw . | |
This should pop up the chrome devtools and display the error in the console. | |
I attempted this on a Mac. |