Skip to content

Instantly share code, notes, and snippets.

View jdjuan's full-sized avatar
:octocat:

Juan Herrera jdjuan

:octocat:
View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<title>Hello!</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="https://unpkg.com/@reactivex/rxjs/dist/global/Rx.js"></script>
</head>
<body>
const { fromEvent } = Rx.Observable;
const move$ = fromEvent(document, 'mousemove');
const log = x => console.log(x);
move$.subscribe(log);