stream-tap
To control (pause or resume) a node stream pipeline. It returns a transform which is supposed to be included into a stream pipeline.
Usage
var Tap = ;var tap = ;
tap = Tap()
Return the tap transform.
tap.turnOn()
tap
will push no data, until tap.turnOn()
is called.
tap.turnOff()
Make tap
collect data, and wait for tap.turnOn
to flush.
Example
var Tap = ;var thr = ; var s1 = ;var s2 = ;var tap = ; s1; console;12345;s1;console;console;tap;
output:
⌘ node example/tap.js
Writing into the pipeline
Writing end
turn tap on
12345