Skip to content

Instantly share code, notes, and snippets.

@Xedii Xedii/stream-node.js Secret
Created Dec 28, 2018

Embed
What would you like to do?
const main = inputFile => {
const readStream = fs.createReadStream(inputFile, { encoding: 'utf8' });
readStream.on('data', (line) => {
console.log(line);
});
readStream.on('end', () => {
console.log('SUCCESS!!');
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.