A first step in the 01 module that just loads a bunch of samples from csv-spectrum and then parses them.
parent
8f4f6d780a
commit
cc90868a63
@ -0,0 +1,16 @@ |
||||
{ |
||||
"name": "01-parse-a-csv-file", |
||||
"version": "1.0.0", |
||||
"description": "", |
||||
"type": "module", |
||||
"main": "step1.js", |
||||
"scripts": { |
||||
"test": "echo \"Error: no test specified\" && exit 1" |
||||
}, |
||||
"author": "", |
||||
"license": "BSD", |
||||
"dependencies": { |
||||
"csv-spectrum": "^1.0.0", |
||||
"neat-csv": "^7.0.0" |
||||
} |
||||
} |
@ -0,0 +1,8 @@ |
||||
import spectrum from "csv-spectrum"; |
||||
import csv from "neat-csv"; |
||||
|
||||
spectrum(async (err, data) => { |
||||
for(let sample of data) { |
||||
console.log(await csv(sample.csv.toString())); |
||||
} |
||||
}); |
Loading…
Reference in new issue