Skip to content

Instantly share code, notes, and snippets.

@andersonleite
Created January 4, 2017 00:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andersonleite/b8f50df019605c425c0b7a3e65f4147e to your computer and use it in GitHub Desktop.
Save andersonleite/b8f50df019605c425c0b7a3e65f4147e to your computer and use it in GitHub Desktop.
function intent(DOMSource) {
// Create streams for the intents that will be observed
const refreshClickStream$ = DOMSource.select('.refresh').events('click');
const close1ClickStream$ = DOMSource.select('.close1').events('click');
const close2ClickStream$ = DOMSource.select('.close2').events('click');
const close3ClickStream$ = DOMSource.select('.close3').events('click');
// Return all the streams ready to be subscribed
return {refreshClickStream$, close1ClickStream$, close2ClickStream$, close3ClickStream$};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment