SHARE
TWEET

Untitled

a guest Jan 20th, 2019 51 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const modal$ = merge(
  2.     show$.pipe(mapTo(true)),
  3.     hide$.pipe(mapTo(false)),
  4.     toggle$.pipe(mapTo(null))
  5.   ).pipe(
  6.     startWith(false),
  7.     scan((acc, curr) => {
  8.       if (curr === null) {
  9.         return !acc;
  10.       } else {
  11.         return curr;
  12.       }
  13.     })
  14.   );
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top