See filter-ldjson.js for the example script.
You can read more about node.js streams (a pretty deep subject) here: https://nodejs.org/api/stream.html
There's some interesting things happening in the run-test.sh script that aren't covered in this course. You can read up on those things here: