Skip to main content

reactiveOr

Alternative: or$$

Types

function reactiveOr(
a: IObservable<boolean>,
b: IObservable<boolean>,
): IObservable<boolean>

Definition

Creates an Observable which performs the boolean OR operation (||) between the values sent by two Observables, and emits the result.

Diagram

Example

Perform the boolean "OR" of two Observables

const subscribe = reactiveOr(
single(true),
single(false),
);

subscribe((value: boolean) => {
console.log(value);
});

Output:

true