b.transform(function (file) { return new Transform({ transform (buf, enc, next) { this.push(buf.toString('utf8').replace(/bar/g, 'baz')) next() } }) })
transform (buf, enc, next) { this.push(buf.toString('utf8').replace(/baz/g, 'qux')) next() }
transform (date, enc, done) { this.push(date.getSeconds() + '\n') done() }
read () { this.push(Math.random() + '\n') }
transform (chunk, enc, done) { this.push(JSON.stringify(chunk) + '\n') done() }
transform (buf, enc, next) { this.push(buf.toString('utf8').replace(/foo/g, 'bar')) next() }