Stream Transform options
All options are optional. All the options from the Node.js Writable Stream API and the Node.js Readable Stream API are supported and passed as is.
Available options
consume
(boolean)
In the absence of a consumer, like astream.Readable
, trigger the consumption of the stream.parallel
(number)
The number of transformation callbacks to run in parallel; only apply with asynchronous handlers; default to "100".params
(anything)
Pass user defined parameters to the user handler as last argument.
Using the parallel
option
This option control the sequential versus concurrent execution of handlers. Note, parallelism only has effect with asynchronous user functions.
In sequential mode, only 1 transformation function is running at a given time. The mode sequential example force a sequential execution by setting the value to "1".
In concurrent mode, the option value defines the maximum number of parallel executions.