Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save LayZeeDK/0c5dd367e938518669d93706880f496a to your computer and use it in GitHub Desktop.
Save LayZeeDK/0c5dd367e938518669d93706880f496a to your computer and use it in GitHub Desktop.
RxJS ≥6 version
const source = instrument(interval(100));
const published = source.pipe(publish());
const a = published.pipe(take(1)).subscribe(observer("a"));
const b = published.pipe(take(1)).subscribe(observer("b"));
const subscription = published.connect();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment