Questions tagged [bacon.js]

A small functional reactive programming library for JavaScript.

200 questions
0
votes
1 answer

Is there an equivalent to subscribe for errors?

If a function yields an error immediately, like in the case below, onError will never be called because the error has already been sent by the time the onError attaches. If this was a value as opposed to an error, one could have used the subscribe…
0
votes
2 answers

How do you abort a Bacon.js Property that is making an AJAX request once 404 is reached?

I have some Property that is making AJAX requests on fire. However, once case 404 is reached, I'd like to terminate this stream, but I'm not sure how to do so. Below is the code: // load :: EventStream (Int -> Int) load = $("#loadimg") …
xiaolingxiao
  • 4,340
  • 3
  • 27
  • 64
0
votes
1 answer

.when for 3 properties in Bacon.js

Is there an easier way to implement combine3? var Bacon = require('baconjs') function emit(delay) { var s = new Bacon.Bus() setTimeout(function () { console.log("emit", delay) s.push(delay) …
nponeccop
  • 13,141
  • 1
  • 39
  • 101
-1
votes
1 answer

Emitting events with Bacon.js

I'm learning Bacon.js and I'm very confused as to how I'm supposed to emit events. I have a super-simple example here of events in node.js var events = require('events') var eventEmitter = new events.EventEmitter() eventEmitter.on("add",…
ThomasReggi
  • 42,912
  • 63
  • 199
  • 343
-1
votes
2 answers

Bacon.js call function every time element loses focus

Update I think I might have it figured out. I was using an old bacon.js version, which might have been part of the problem. I'll update later as I figure out if I have it. Here's the partially working version: http://cdpn.io/yfxDA I'm trying to call…
Jon49
  • 3,994
  • 2
  • 31
  • 66
1 2 3
13
14