Skip to content

Instantly share code, notes, and snippets.

@haknick
Created April 17, 2014 20:51
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 haknick/11010798 to your computer and use it in GitHub Desktop.
Save haknick/11010798 to your computer and use it in GitHub Desktop.
Bacon.js Bus
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