Hullo JS
Github
Chat
Searchβ¦
Hullo JS
Hullo π
Hullo π core
Intro to Core
API
Observable
Duplex
Channel
Atom
Redux
of
combineLatest
timeout
interval
Operators
Hullo π browser
Intro to Browser
API
Hullo π DOM
Intro to DOM
Guide
API
Hullo π Node
Intro to Node
API
Powered By
GitBook
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.
1
import
{
of
,
map
,
combineLatest
}
from
'@hullo/core'
;
2
β
3
const
og
=
of
([
1
,
2
,
3
]);
4
β
5
combineLatest
([
6
og
.
pipe
(
map
(
n
=>
n
*
1
)),
7
og
.
pipe
(
map
(
n
=>
n
*
2
)),
8
og
.
pipe
(
map
(
n
=>
n
*
3
)),
9
]).
subscribe
({
10
next
:
console
.
log
11
});
12
// as og emits 1
13
// prints: [ 1, 2, 3 ]
14
β
15
// as og emits 3
16
// prints: [ 3, 6, 9 ]
17
β
18
// as og emits 5
19
// prints: [ 5, 10, 15 ]
Copied!
Previous
of
Next
timeout
Last modified
3yr ago
Copy link