common.readFromPipe() is a useful function for any command that can be on the right-hand-side of a pipe (i.e. sed in the example grep('foo', 'file.txt').sed(/o/g, 'a')). This will be an important part of a future plugin API.
Currently, the function must be invoked as common.readFromPipe(this) (always passing this as the only parameter). This is awkward at best, and we should be able to write in a workaround to allow it to be invoked instead as common.readFromPipe() (no parameters).