Advertisement
Guest User

Untitled

a guest
Aug 31st, 2014
233
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. // include the Bacon.js library
  2. var Bacon = require('baconjs');
  3.  
  4. // Export method as a module.
  5. module.exports = function () {
  6. var vals = ["Bacon", "is", "delicious"];
  7. var bus = new Bacon.Bus();
  8. vals.map(function(val, i){
  9. setTimeout(bus.push.bind(bus, val), i*100+100);
  10. });
  11. setTimeout(bus.end.bind(bus), 500);
  12. return bus;
  13. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement