map()
Function
map<I, R>(mapFn:
UnaryFn<I,R>):ContinuingPipeOperator<I,R>
Maps a value to a different one using the mapFn.
ts
declare const read1: Read<string>;
const read: Read<number> = read1.pipe(map((value: string) => Number.parseInt(value)));Observable Behavior:
Works exactly like map of RxJS.
Sync Behavior:
Maps the current value to a new value using the mapFn
Source: rxjs-read/src/lib/operators/map.operator.ts:28
Type parameters
| Parameter | Description |
|---|---|
| I | type of the input value |
| R | type of the return value |
Parameters
| Parameter | Type | Description |
|---|---|---|
| mapFn | UnaryFn<I, R> | function used to map the value |
Returns
ContinuingPipeOperator<I, R>