Skip to content

Instantly share code, notes, and snippets.

@gregberge
Created October 19, 2016 09:51
Show Gist options
  • Select an option

  • Save gregberge/4a8e54bee3e6778c9ee9187d0e3c5f0c to your computer and use it in GitHub Desktop.

Select an option

Save gregberge/4a8e54bee3e6778c9ee9187d0e3c5f0c to your computer and use it in GitHub Desktop.
/**
* publishReplay + refCount.
* Similar to share but using a ReplaySubject.
*
* @param {number} [count=1]
* @returns {Observable}
*/
export function shareReplay(count = 1) {
return this.publishReplay(count).refCount();
}
@oliviertassinari
Copy link

Est-ce qu'on a l'equivalent share avec un Subject ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment