distinctUntilChanged()
Function
distinctUntilChanged<T>(comparator?:
Function
):ContinuingPipeOperator
<T
,T
>
Prevents emission of a value in the observable chain, if the value did not change.
ts
declare const read1: Read<string>;
const read: Read<string> = read1.pipe(distinctUntilChanged<string>());
Observable Behavior:
Works exactly like distinctUntilChanged of RxJS.
Sync Behavior:
Has no effect on sync calls. The value is just passed through.
Source: rxjs-read/src/lib/operators/distinct-until-changed.operator.ts:27
Type parameters
Parameter | Description |
---|---|
T | type of the value |
Parameters
Parameter | Type | Description |
---|---|---|
comparator? | (previous: T , current: T ) => boolean | optionally pass a comparator function to use. |
Returns
ContinuingPipeOperator
<T
, T
>