map
Applies a given project
function to each value emitted by the source
Observable, and emits the resulting values as an Observable.
Parameters
Returns
OperatorFunction<T, R>
: An Observable that emits the values from the source
Observable transformed by the given project
function.
Description
Like Array.prototype.map(), it passes each source value through a transformation function to get corresponding output values.
Similar to the well known Array.prototype.map
function, this operator
applies a projection to each value and emits that projection in the output
Observable.
Example
Map every click to the clientX position of that click