Reactive Extensions for JavaScript (RxJS) V2.0.20327 Beta Available Now
-
9 เมษายน 2555 19:25
All:
The Reactive Extensions for JavaScript V2.0.20327 Beta has been released! You can download it via our download page or via NuGet. This release covers quite a bit of ground including near parity with the Reactive Extensions for .NET V2.0 Beta as well as including experimental operators now shipped in rx.experimental.min.js.
What's new in this release?
There's quite a bit new in this release including the following:
- New Operators
- N-Ary Operators - we now support n-ary arguments for both zip and combineLatest:
var obs1 = Rx.Observable.returnValue(1) , obs2 = Rx.Observable.returnValue(2) , obs3 = Rx.Observable.returnValue(3); var zipped = obs1.zip(obs2, obs3, function (a, b, c) { return a + b + c; }); var combined = obs1.combineLatest(obs2, obs3, function (a, b, c) { return a + b + c; }); - Time-based Operators (with .NET equivalent):
Rx.Observable.delaySubscription (DelaySubscription)
Rx.Observable.delayWithSelector (Delay)
Rx.Observable.throttleWithSelector (Throttle)
Rx.Observable.timeoutWithSelector (Timeout)
- Concurrency Operators (with .NET equivalent):
Rx.Observable.prototype.observeOn (ObserveOn)
Rx.Observable.prototype.subscribeOn (SubscribeOn)
- Experimental Operators in rx.experimental.min.js (with .NET equivalent):
Rx.Observable.forkJoin, Rx.Observable.prototype.forkJoin
Rx.Observable.prototype.expand (Expand)
Rx.Observable.doWhile (DoWhile)
Rx.Observable.forIn (For)
Rx.Observable.ifThen (If)
Rx.Observable.switchCase (Switch)
Rx.Observable.whileDo (While)
- N-Ary Operators - we now support n-ary arguments for both zip and combineLatest:
- Changed Operators (Bug Fixes)
- Rx.Observable.range - fix possible stack overflow issue
- Rx.Observable.merge - remove required scheduler as the first parameter
var obs1 = Rx.Observable.fromArray([1,2,3]) , obs2 = Rx.Observable.fromArray([4,5,6]); // Old var oldmerged = Rx.Observable.merge( null, // no scheduler provided obs1, obs2 ); // New and handles default scheduler var newmerged = Rx.Observable.merge( obs1, obs2 ); - Rx.Observable.startWith - now accepts null as a default value
-
Performance Improvements - refactored all Subjects, Schedulers and Disposables to be more performance oriented
-
Breaking Changes
We try to keep all breaking changes to a minimum, keeping most public facing APIs consistent, however, due to performance, we made a few changes:- Disposables - isDisposed changed from a function to a simple field
- CompositeDiposable - changed .count funciton to .length field
Enjoy the new release!
Matt
- New Operators
ตอบทั้งหมด
-
14 เมษายน 2555 17:26
Great to see the new drop closely following the .Net version. Good work.
One comment, I assume you meant to say "CompositeDisposable" at the end of your email.
http://www.ThinqLinq.com http://www.LinqInAction.net - "LINQ In Action", The book is now available. Don't wait for the movie
-
10 พฤษภาคม 2555 20:22
rx.time-vsdoc.js has a few issues:
- delaySubscription, delayWithSelector, throttleWithSelector, timeoutWithSelector are all declared as static Observable methods instead of instance methods (they should hang from observableProto)
- timeoutWithSelector does not declare its function arguments
rx-vsdoc.js:
- Declares observerOn() instead of observeOn().
- แก้ไขโดย bman654 11 พฤษภาคม 2555 3:30
-
14 พฤษภาคม 2555 10:43
rx-vsdoc:
Observable.finallyAction summary reads: Invokes a specified action after source observable sequence terminates normally or by an exception.
It took me a while to discover that it *also* fires the action if the subscription is disposed. Would be nice if this info was included in the XML documentation.
-
15 พฤษภาคม 2555 20:57
rx-vsdoc:
observableProto.repeat declares its function parameter as repeatCount but the xml docs refer to the parameter as count and so no intellisense is shown for the param.