Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // include the Bacon.js library
- var Bacon = require('baconjs');
- // Export method as a module.
- module.exports = function () {
- var vals = ["Bacon", "is", "delicious"];
- var bus = new Bacon.Bus();
- vals.map(function(val, i){
- setTimeout(bus.push.bind(bus, val), i*100+100);
- });
- setTimeout(bus.end.bind(bus), 500);
- return bus;
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement