UNPKG

1.39 kBMarkdownView Raw
1# Glossary
2
3## read (end, cb)
4
5A function that retrives the next chunk.
6All readable streams (sources, and throughs)
7must return a `read` function.
8
9## reader (read,...)
10
11A function to create a reader. It takes a `read` function
12as the first argument, and any other options after that.
13
14When passed to `pipeable` or `pipeableSource`,
15a new function is created that adds `.pipe(dest)`
16
17## Lazy vs Eager
18
19Lazy means to avoid doing something until you know you have
20to do it.
21
22Eager means to do something early, so you have it ready
23immediately when you need it.
24
25## [Source](sources/index.md)
26
27The first stream in the pipeline. The Source is not a reader (not writable).
28
29## [Sink](sinks/index.md)
30
31The last stream in the pipeline. The Sink is not readable.
32
33## [Through](throughs/index.md)
34
35The stream (or streams) in the middle of the pipeline, between your source and sink. A through is a reader and readable.
36
37## Push vs Pull
38
39A pull-stream is a stream where the movement of data
40is initiated by the sink, and a push-stream
41is a stream where the movement of data is initiated
42by the source.
43
44## Reader vs Writable
45
46In push streams, destination streams (Through and Sink),
47are _writable_. They are written to by the source streams.
48
49In pull streams, destination streams _read_ from the source
50streams. They are the active participant, so they are called
51_readers_ rather than _writables_.