Skip to content

Instantly share code, notes, and snippets.

@artze
Created June 8, 2019 08:02
Show Gist options
  • Save artze/b4e907d64c45716127451623522a479c to your computer and use it in GitHub Desktop.
Save artze/b4e907d64c45716127451623522a479c to your computer and use it in GitHub Desktop.
Flowing readable stream basic example
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