Skip to content

Instantly share code, notes, and snippets.

@Ibro
Created April 26, 2017 05:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Ibro/34355803d2b43d143ce05cd6f6c45583 to your computer and use it in GitHub Desktop.
Save Ibro/34355803d2b43d143ce05cd6f6c45583 to your computer and use it in GitHub Desktop.
RxJS fromEvent - Take 10 - Subscribing to mouse events - Coding Blast - www.codingblast.com
import {Observable} from 'rxjs';
Observable
.fromEvent(document, 'mousemove')
.take(10)
.forEach(function next(value) {
console.log('next: ', value);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment