Guest User

Untitled

a guest
Jul 18th, 2018
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. class Observable {
  2. ...
  3.  
  4. filter(predicate: (value) => boolean) {
  5. return new Observable(observer => {
  6. return this.subscribe({
  7. next(value) {
  8. if (predicate(value)) {
  9. observer.next(value);
  10. }
  11. },
  12. ...
  13. });
  14. });
  15. }
  16.  
  17. }
Add Comment
Please, Sign In to add comment