Closed dixonsiu closed 3 years ago
Hi @dixonsiu
How about using Papa Parse ?
After approving #148, we can use Papa Parse like below.
function csvtest(request) {
const Papa = require("./papaparse.min");
const dat= Papa.parse("aaa,bbb,ccc\nhoge,foo,bar\n111,222,333", {header: true});
return {
status: 200,
headers: { "Content-Type": "application/json" },
body: [
JSON.stringify(dat),
],
};
}
Yes, I was already using papaparse by modifying the first line.
exports.Papa = (function(root, factory)
Oh sorry. I don't know that you solved it already. Could you close this issue?
By the way, the modifying lines is not good in perspective of maintainability ðŸ˜
Yup, hopefully, with your pull request, I don't have to write the silly one line anymore.
It would be nice to use a library like this to support parsing and exporting of CSV file within the Engine Script.