im using angular and express server, in one of my routes im sending to the client large amount of csv data in chunks. im capturing the csv chunks in angular and i need to genreate a csv file from the chunks but im getting heap out of memory error becuase i can't find a way to write to the file in chunks so i just collect all the data and then save it to a file. does someone know how to write to a csv file in chunks? much appreciated.
this is my code of saving the file (need to replace it):
constlink = document.createElement("a");
const blob = new Blob(['\uFEFF' +event['data']],{type:'text/csv; charset=utf-18'});
link.href = window.url.createObjectUrl(blob);
link.download = "aDefaultFileName.csv";
document.boy.appendChild(link);
link.click();
link.innerHTML = "Click here to download the file";
document.body.appendChild(link);