Skip to content

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: lib/operators/map.operator.ts:28

Type parameters

ParameterDescription
Itype of the input value
Rtype of the return value

Parameters

ParameterTypeDescription
mapFnUnaryFn<I, R>function used to map the value

Returns

ContinuingPipeOperator<I, R>