Skip to content

Instantly share code, notes, and snippets.

@pemrouz
Created October 15, 2019 15:12
Show Gist options
  • Save pemrouz/0c497f7aada872c75b82975f2c61bd1a to your computer and use it in GitHub Desktop.
Save pemrouz/0c497f7aada872c75b82975f2c61bd1a to your computer and use it in GitHub Desktop.
Emitter/Observable
new Emitter({
  run(me){
    me.send(1)
    me.send(2)
    me.send(3)
    me.resolve()
  }  
})
new Observable((next, error, complete, signal) => {
  next(1);
  next(2);
  next(3);
  complete();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment