Advertisement
Guest User

Untitled

a guest
Aug 17th, 2019
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. import { fromEvent, Subscription, of } from 'rxjs';
  2. import { map, filter } from 'rxjs/operators';
  3.  
  4. const dataSource = of(0, 1, 2, 3, 4, 5);
  5. const subscription: Subscription = dataSource.pipe(
  6. map(value => value * 10),
  7. filter(value => value > 40)
  8. ).subscribe(value => console.log(value));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement