I'm gonna throw a post here weekly from now on, with short posts that take less than 30 minutes to write. Let's see what happens.
I just made 2 releases of Bacon.js today. And in total, there's been 32 minor releases since 0.7.0 that my previous post covered. A lot of bugs have been fixed and performance improvements have been made. So if you're for some reason using Bacon.js version < 0.7.32, you should update! In case you're interested in a detailed list of changes, have a look at RELEASE-NOTES.md!
Anyway, let me briefly introduce the API changes since 0.7.0.
Error handling improvements (#310)
Added Bacon.retry for retrying a background request a few times before giving up and producing an Error event. Here's @mileskin's original example with JQuery Ajax.
Bacon.retry
source: -> Bacon.fromPromise($.ajax(...))
retries: 4
interval: ({retriesDone}) -> (1 + retriesDone) * 5000
isRetryable: (response) -> response.status isnt 401
flatMapWithConcurrencyLimit, flatMapConcat, bufferingThrottle, holdWhen (#324)
The bufferingThrottle method allows you to throttle events with a buffer. So, when a regular throttle discards excess events, this one will buffer them.
The flatMapWithConcurrencyLimit method is a variant of flatMap that limits the number of concurrently active child streams, so that you can, for instance limit the number of concurrent AJAX requests to a certain maximum by automatically queuing the excess requests.
The flatMapConcat method is like the previous, but with concurrency limit of 1.
The holdWhen method can be used like a valve, to buffer events when a Property holds the value true, and release all buffered events when the value changes to false.
Support "on/off" events in Bacon.fromEventTarget (#461)
Some libs use the "on" and "off" methods for registering/removing event listeners. Now it's easy to integrate into those libs too. So, for instance, if you use CodeMirror and want a stream of code changes in the editor, you can now
Bacon.fromEventTarget(codeMirror, "change")
That's it for now. Will come back next week. Suggestions for topics?
The way will certainly nanotechnology have an impact on treatments as well as remedies? https://imgur.com/a/skVvULY https://imgur.com/a/qIGy4bE https://imgur.com/a/xlHAxRx https://imgur.com/a/K29Cp5d https://imgur.com/a/UDy0oqp https://imgur.com/a/uZ9rPSd https://imgur.com/a/JNHn72S
ReplyDelete