Skip to content

Instantly share code, notes, and snippets.

@cartant
Last active May 13, 2018 05:46
Show Gist options
  • Select an option

  • Save cartant/1ad458fdef6943220de8c6122290682a to your computer and use it in GitHub Desktop.

Select an option

Save cartant/1ad458fdef6943220de8c6122290682a to your computer and use it in GitHub Desktop.
const notifier = new Subject<any>();
const fork = pages<Repo>("https://api.github.com/users/cartant/starred", notifier).pipe(
concatMap((repos, index) => concat(
from(repos).pipe({
concatMap(repo => ajax.post(forks_url)),
ignoreElements()
})),
of(index)
),
tap(notifier)
);
fork.subscribe({
complete: () => console.log("forked")
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment