combineLatest

import { combineLatest } from '@hullo/core';

This is a function that should be provided with an array of observables and will return new observable that sends out arrays of last values emitted through these source observables.

import { of, map, combineLatest } from '@hullo/core';
const og = of([1,2,3]);
combineLatest([
og.pipe(map(n => n * 1)),
og.pipe(map(n => n * 2)),
og.pipe(map(n => n * 3)),
]).subscribe({
next: console.log
});
// as og emits 1
// prints: [ 1, 2, 3 ]
// as og emits 3
// prints: [ 3, 6, 9 ]
// as og emits 5
// prints: [ 5, 10, 15 ]