Skip to content

Instantly share code, notes, and snippets.

@wyeo
Last active May 29, 2017 15:21
Show Gist options
  • Save wyeo/2e50c1668f9983c7c2788f563be052ce to your computer and use it in GitHub Desktop.
Save wyeo/2e50c1668f9983c7c2788f563be052ce to your computer and use it in GitHub Desktop.
class Observable {}
Observable.of = (...args) => {
Observable.prototype.subscribe = (nextFn, errorFn, completeFn) => {
args.map(x => nextFn(x))
completeFn()
}
return new Observable()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment