Created
June 8, 2019 08:02
-
-
Save artze/b4e907d64c45716127451623522a479c to your computer and use it in GitHub Desktop.
Flowing readable stream basic example
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
process.stdin | |
.on('data', (chunk) => { | |
console.log(`Chunk read: (${chunk.length}) "${chunk.toString()}"`); | |
}) | |
.on('end', () => process.stdout.write('End of stream')); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment