Automating with Node.js by Shaun Stone

Automating with Node.js by Shaun Stone

Author:Shaun Stone [Stone, Shaun]
Language: eng
Format: epub
Published: 2018-05-31T18:30:00+00:00


We will use a Transform stream when parsing our CSV file.

So, starting with our required modules. We have two new additions:

csv-parse is responsible for the parsing of a CSV file: it can convert CSV into JSON at a rate of around 90,000 rows per second.

stream-transform is used to provide a callback for each row sequentially for convenience.

examples/017/deploy-games.js

require('colors'); const path = require('path'); const { stdout } = require('process'); const parse = require('csv-parse'); const transform = require('stream-transform'); const fs = require('fs');



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.