Skip to content

Instantly share code, notes, and snippets.

const filterLoggedIn$ = (stream$) => {
return stream$.pipe(
withLatestFrom(iceCreamAuth$),
filter((auth) => auth)
)
};
const combinedInfoFactory$ = (
iceCreamPreferences$,
iceCreamInventory$,
export class AppComponent {
onDestroy$ = new Subject();
count = 5;
ngOnInit () {
this.iceCreams$ = fromEvent(window, 'resize').pipe(
flatMap(() => fromPromise(fetchIceCreams(this.count))),
takeUntil(this.onDestroy$)
);
}
class AppComponent {
constructor () {
this.count = 5;
this.onResize = this._onResize.bind(this);
}
componentDidMount () {
window.addEventListener('resize', this.onResize)
}