method ReadableBase.prototype.map
#ReadableBase.prototype.map(fn: (data: any,options?: Pick<ArrayOptions, "signal">,) => any,options?: ArrayOptions,): ReadableThis method allows mapping over the stream. The fn function will be called for every chunk in the stream.
If the fn function returns a promise - that promise will be awaited before being passed to the result stream.
Parameters #
#fn: (data: any,options?: Pick<ArrayOptions, "signal">,) => anya function to map over every chunk in the stream. Async or not.
optional
#options: ArrayOptionsReturn Type #
Readablea stream mapped with the function fn.