github Reactive-Extensions/RxJS v2.2.9
Reactive Extensions for JavaScript (RxJS) version 2.2.9

latest releases: v4.1.0, v4.0.8, v4.0.7...
10 years ago

Slight update to 2.2.7 to include shortcut operators for adding a reference counter for all connectable observables, by calling refCount. Adding the share(), shareValue(), and shareReplay() methods. These methods are optimized for the 80% case, in which the developer simply wants to share side effects among multiple concurrent observer. This allows developers simple code like this:

var interval = Rx.Observable.interval(1000);

var source = interval
    .take(2)
    .do(function (x) {  console.log('Side effect'); })
    .share();

// When the number of observers subscribed to published observable goes from 
// 0 to 1, we connect to the underlying observable sequence.
source.subscribe(createObserver('SourceA'));

// When the second subscriber is added, no additional subscriptions are added to the
// underlying observable sequence. As a result the operations that result in side 
// effects are not repeated per subscriber.
source.subscribe(createObserver('SourceB'));

function createObserver(tag) {
    return Rx.Observer.create(
        function (x) {
            console.log('Next: ' + tag + x);
        },
        function (err) {
            console.log('Error: ' + err);
        },
        function () {
            console.log('Completed');
        }
    );
}

Other changes:

  • Fixed Bower version issue
  • Added SauceLabs testing

Don't miss a new RxJS release

NewReleases is sending notifications on new releases.