Skip to main content

reactiveMultiply

Alternatives: mul$$, multiply$$

Types

function reactiveMultiply(
a: IObservable<number>,
b: IObservable<number>,
): IObservable<number>

Definition

Creates an Observable which performs an multiplication (*) between the values sent by two Observables, and emits the result.

Diagram

Example

Perform the "multiplication" of two Observables

const subscribe = reactiveMultiply(
single(10),
single(5),
);

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

Output:

50