Question: For example if I have 

```
readableStream.pipe(ws1).pipe(ws2).pipe(ws3)

```

How can I envelope that transformation chain in a single function and then reuse it in another transformation chain?

I want to do some like this:

```
var transformationChain1 = readableStream.pipe(ws1).pipe(ws2).pipe(ws3)
readableStream2.pipe(transformationChain1).pipe(endWs)

```

Answer: 
you could probably use

```
var combine = require('stream-combiner2')
var ws = combine(ws1, ws2, ws3);
readableStream2.pipe(ws).pipe(endWs);

```
Maybe I'm misunderstanding (and my Node.js is rusty so it's entirely possible), but why not do exactly what you said and wrap it in a function?

```
function transformationChain(rs) {
  return rs.pipe(ws1).pipe(ws2).pipe(ws3);
}

var transformationChain1 = transformationChain(readableStream);
readableStream2.pipe(transformationChain1).pipe(endWs);

```