Hullo JS
Search…
Intro to Core
npm i @hullo/core
In this package you'll find two categories of things:
    Observables (regular and specialised ones)
    operators (functions that'll wrap the observable into an observable with additional mechanics)

Install

1
npm i @hullo/core
Copied!
...then in your code:
1
import { Observable, map } from '@hullo/core'
2
​
3
new Observable(observer => {
4
observer.next(1)
5
.then(() => observer.next(2))
6
.then(() => observer.next(3));
7
.then(() => observer.complete());
8
}).pipe(map(n => n * 2)).subscribe({
9
next: v => { console.log(v) }
10
});
11
​
12
// logs out 2,4 and 6
Copied!
​
Last modified 2yr ago
Copy link
Contents
Install