I know that one can synchronously read a file in NodeJS like this:
var fs = require('fs');
var content = fs.readFileSync('myfilename');
console.log(content);
I am instead interested in being able to read the contents from a stream into a string synchronously. Thoughts?