falcor-observable
An Observable implementation compatible with the Falcor DataSource API.
Unless you are implementing a Falcor DataSource you will likely be better served by the more fully featured RxJS.
Error handling policy
The error handling policy of the Observable is configurable to allow for easier core dump debugging.
By default, errors thrown by the subscriber function are caught as they are in the Promise API. Errors calling the observer's notification callbacks are swallowed by default.
To disable all try/catch usage in falcor-observable, call set the environment
variable FALCOR_OBSERVABLE_NO_CATCH
to a non empty value before this package
is first imported.
Interoperability with other Observable implementations
This package is interoperable with RxJS and other Observable implementations
following the symbol-observable protocol. Use Observable.from(other)
to
convert between implementations:
const Rx = ;const falcorObservable = Observable; // Take any compliant observable.const obs = RxObservable; // Convert to falcor-observable.const fobs = falcorObservable;fobs; // Convert to RxJS.const rxobs = RxObservable;rxobs;
Applying operators to an Observable
The pipe
instance method can be used to apply operators to an Observable.
const Observable map = ; Observable ;