Skip to content

Instantly share code, notes, and snippets.

@lmatteis
Created December 3, 2016 14:28
Show Gist options
  • Save lmatteis/529df432548e3ed4c8777cc805a5a825 to your computer and use it in GitHub Desktop.
Save lmatteis/529df432548e3ed4c8777cc805a5a825 to your computer and use it in GitHub Desktop.
function main(sources) {
const request$ = sources.ACTION
.debug(action => console.log(action)) // This gets called when I return this stream as a sink to HTTP
.filter(action => action.type === ActionTypes.REQUESTED_USER_REPOS)
.map(action => action.payload.user)
.map(user => ({
url: `https://api.github.com/users/${user}/repos`,
category: 'users'
}));
return {
// ACTION: xs.of({ type: 'foo' }),
HTTP: request$
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment