Skip to content

Instantly share code, notes, and snippets.

@mmomtchev
Created July 9, 2020 12:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mmomtchev/dc83ed4a204c7fae28792c85d5ec16e4 to your computer and use it in GitHub Desktop.
Save mmomtchev/dc83ed4a204c7fae28792c85d5ec16e4 to your computer and use it in GitHub Desktop.
const fs = require('fs');
const readline = require('readline');
const parseline = require('./parseline');
const rs = fs.createReadStream('allCountries.txt');
const rl = readline.createInterface({ input: rs });
(async () => {
console.time(__filename);
for await (const line of rl) {
parseline(line);
}
console.timeEnd(__filename);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment