made with esnextbin
Last active
April 12, 2016 11:11
-
-
Save briancavalier/da674829c6b6f13cada1f8235f543fc5 to your computer and use it in GitHub Desktop.
esnextbin sketch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!doctype html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>ESNextbin Sketch</title> | |
| <!-- put additional styles and scripts here --> | |
| </head> | |
| <body> | |
| <!-- put markup and other contents here --> | |
| </body> | |
| </html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { periodic } from 'most' | |
| const a = periodic(1000, 'a').startWith('b').multicast() | |
| a.observe(x => console.log('ob1', x)) | |
| setTimeout(() => a.observe(x => console.log('ob2', x)), 1010) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "name": "esnextbin-sketch", | |
| "version": "0.0.0", | |
| "dependencies": { | |
| "most": "0.18.5" | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 'use strict'; | |
| var _most = require('most'); | |
| var a = (0, _most.periodic)(1000, 'a').startWith('b').multicast(); | |
| a.observe(function (x) { | |
| return console.log('ob1', x); | |
| }); | |
| setTimeout(function () { | |
| return a.observe(function (x) { | |
| return console.log('ob2', x); | |
| }); | |
| }, 1010); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment