Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

get value from createReadStream

const fs = require('node:fs');
const rr = fs.createReadStream('foo.txt');
rr.on('readable', () => {
  console.log(`readable: ${rr.read()}`);
});
rr.on('end', () => {
  console.log('end');
});
Source by nodejs.org #
 
PREVIOUS NEXT
Tagged: #createReadStream
ADD COMMENT
Topic
Name
4+3 =