map
fun map(fn: (data: Any?, options: ArrayOptions?) -> Any?, options: ArrayOptions = definedExternally): Readable(source)
This 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 await
ed before being passed to the result stream.
Since
v17.4.0, v16.14.0
Parameters
fn
a function to map over every chunk in the stream. Async or not.