git ssb

2+

cel / scuttlebot.io



Tree: 2b3708ff390cc334653a3a9ff0f511f866423af7

Files: 2b3708ff390cc334653a3a9ff0f511f866423af7 / tmpl / apis / pull-stream / core-sinks.md

690 bytesRaw

Sinks

A Sink is a stream that is not readable. You must have a sink at the end of a pipeline for data to move towards.

You can only use one sink per pipeline.

pull(source, through, sink)

See also:

drain (op?, done?)

Drain the stream, calling op on each data. call done when stream is finished. If op returns ===false, abort the stream.

reduce (reduce, initial, cb)

reduce stream into single value, then callback.

collect(cb)

Read the stream into an array, then callback.

onEnd (cb)

Drain the stream and then callback when done.

log

output the stream to console.log

Built with git-ssb-web