daily pastebin goal
81%
SHARE
TWEET

Untitled

a guest Jul 11th, 2018 58 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. let stream = fs.createReadStream("Supliers.csv");
  2.  
  3. let csvStream = csv({headers: true})
  4. .on("data", function(data){
  5.      /*data.forEach(x => {
  6.       console.log(x)
  7.      })*/
  8.  
  9.      Final.push(data)
  10. })
  11. .on("end", function(){
  12.      console.log(Final);//[THE COMPLETE DATA TOTALLY OK]
  13. });
  14.  
  15. stream.pipe(csvStream);
  16.  
  17. console.log(Final)// []
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top