Created
April 17, 2014 20:51
-
-
Save haknick/11010798 to your computer and use it in GitHub Desktop.
Bacon.js Bus
This file contains 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
var Bacon = require('baconjs'); | |
var bus = new Bacon.Bus(); | |
bus.onValue(function(){ | |
var a = Bacon.fromArray([1,2,3]) | |
a.onValue(function(val){ | |
console.log(val) | |
}) | |
a.onEnd(function(){ | |
console.log("END") | |
}) | |
}) | |
bus.push(1); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment