Skip to content

Instantly share code, notes, and snippets.

@briancavalier
Last active April 12, 2016 11:11
Show Gist options
  • Select an option

  • Save briancavalier/da674829c6b6f13cada1f8235f543fc5 to your computer and use it in GitHub Desktop.

Select an option

Save briancavalier/da674829c6b6f13cada1f8235f543fc5 to your computer and use it in GitHub Desktop.
esnextbin sketch
<!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>
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)
{
"name": "esnextbin-sketch",
"version": "0.0.0",
"dependencies": {
"most": "0.18.5"
}
}
'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