id author title date pages extension mime words sentences flesch summary cache txt www-npmjs-com-1912 event-stream - npm .html text/html 1295 220 79 process.stdin //connect streams together with 'pipe' .pipe(es.map(function (data, cb) { //turn this async function into a stream es.map(function (data, callback) { Note: if a callback is not called, map will think that it is still being processed, If you want to process each line of the stream, transform the data, reassemble, and KEEP the line breaks the example will look like this: .pipe(es.map(function (line, cb) { .pipe(es.map(function (line, cb) { Create a through stream that emits separator between each chunk, just like Array#join. from may be a String or a RegExp. Works just like string.split(from).join(to), but streaming. create a readable stream (that respects pause) from an async function. all data events are stored in an array, which is passed to the callback when the stream ends. function and an initial value it will return a through stream that emits a single data event with the reduced value once the input stream ends. process.stdin.pipe(reduce(function(acc, data) { ./cache/www-npmjs-com-1912.html ./txt/www-npmjs-com-1912.txt