Last active
July 9, 2020 13:29
-
-
Save mmomtchev/27c99a27a1427703eaa2636603c54e16 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fs = require('fs'); | |
const es = require('event-stream'); | |
const parseline = require('./parseline'); | |
const rs = fs.createReadStream('allCountries.txt'); | |
console.time(__filename); | |
rs.pipe(es.split()).pipe(es.through(parseline)); | |
rs.on('close', () => console.timeEnd(__filename)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment