Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const import_csv = id => {
- this.id = id;
- this.file = function (filePath, separator = ';', encoding = 'win1252') {
- this.filePath = filePath;
- this.separator = separator;
- this.encoding = encoding;
- this.stream = fs.createReadStream(filePath)
- .pipe(iconv.decodeStream(encoding))
- .pipe(parser({ separator: separator }));
- return this;
- };
Add Comment
Please, Sign In to add comment