1 | # Throughs
|
2 |
|
3 | A Through is a stream that both reads and is read by
|
4 | another stream.
|
5 |
|
6 | Through streams are optional.
|
7 |
|
8 | Put through streams in-between [sources](../sources/index.md) and [sinks](../sinks/index.md),
|
9 | like this:
|
10 |
|
11 | ```js
|
12 | pull(source, through, sink)
|
13 | ```
|
14 |
|
15 | Also, if you don't have the source/sink yet,
|
16 | you can pipe multiple through streams together
|
17 | to get one through stream!
|
18 |
|
19 | ```js
|
20 | var throughABC = function () {
|
21 | return pull(
|
22 | throughA(),
|
23 | throughB(),
|
24 | throughC()
|
25 | )
|
26 | }
|
27 | ```
|
28 |
|
29 | Which can then be treated like a normal through stream!
|
30 |
|
31 | ```js
|
32 | pull(source(), throughABC(), sink())
|
33 | ```
|
34 |
|
35 | See also:
|
36 | * [Sources](../sources/index.md)
|
37 | * [Sinks](../sinks/index.md)
|
38 |
|
39 | ## [map](./map.md)
|
40 | ## [asyncMap](./async-map.md)
|
41 | ## [filter](./filter.md)
|
42 | ## [filterNot](./filter-not.md)
|
43 | ## [unique](./unique.md)
|
44 | ## [nonUnique](./non-unique.md)
|
45 | ## [take](./take.md)
|
46 | ## [flatten](./flatten.md)
|