{Readable, Transform} = require("stream") class ToUpper extends Transform _transform: (data, enc, next) -> @push data.toString().toUpperCase() next() # a simple transform stream tx = new ToUpper # a simple source stream rs = new Readable rs.push 'the quick brown fox jumps over the lazy dog!\n' rs.push null rs.pipe(tx) .pipe(process.stdout) # THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG!